Added option to set background image (fixes #1)
This commit is contained in:
parent
b34e5d9570
commit
9540ce5e1c
2 changed files with 22 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ Rectangle
|
|||
{
|
||||
id: root
|
||||
color: config.color_bg
|
||||
property variant geometry: screenModel.geometry(screenModel.primary)
|
||||
|
||||
state: "stateUsers"
|
||||
states:
|
||||
|
|
@ -14,6 +15,8 @@ Rectangle
|
|||
{
|
||||
name: "statePower"
|
||||
|
||||
PropertyChanges { target: background; x: geometry.x }
|
||||
|
||||
PropertyChanges { target: pagePower; enabled: true ; focus: true ; x: 0 }
|
||||
PropertyChanges { target: pageSessions; enabled: false; focus: false; x: areaMain.width }
|
||||
PropertyChanges { target: pageUsers; enabled: false; focus: false; x: areaMain.width * 2 }
|
||||
|
|
@ -27,6 +30,8 @@ Rectangle
|
|||
{
|
||||
name: "stateSessions"
|
||||
|
||||
PropertyChanges { target: background; x: geometry.x - 20 }
|
||||
|
||||
PropertyChanges { target: pagePower; enabled: false; focus: false; x: -areaMain.width }
|
||||
PropertyChanges { target: pageSessions; enabled: true ; focus: true ; x: 0 }
|
||||
PropertyChanges { target: pageUsers; enabled: false; focus: false; x: areaMain.width }
|
||||
|
|
@ -39,6 +44,8 @@ Rectangle
|
|||
{
|
||||
name: "stateUsers"
|
||||
|
||||
PropertyChanges { target: background; x: geometry.x - 40 }
|
||||
|
||||
PropertyChanges { target: pagePower; enabled: false; focus: false; x: -areaMain.width * 2 }
|
||||
PropertyChanges { target: pageSessions; enabled: false; focus: false; x: -areaMain.width }
|
||||
PropertyChanges { target: pageUsers; enabled: true ; focus: true ; x: 0 }
|
||||
|
|
@ -51,6 +58,20 @@ Rectangle
|
|||
|
||||
TextConstants { id: localeText }
|
||||
|
||||
Background
|
||||
{
|
||||
id: background
|
||||
x: geometry.x - 40
|
||||
y: geometry.y
|
||||
width: geometry.width + 40
|
||||
height: geometry.height
|
||||
source: config.background
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
visible: status != Image.Error
|
||||
|
||||
Behavior on x { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: areaTop
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
font=Roboto
|
||||
background=
|
||||
color_bg=#222222
|
||||
color_button_bg_idle=#888888
|
||||
color_button_bg_hover=#aaaaaa
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue