Update layout and element's position
14
Main.qml
|
@ -25,7 +25,7 @@ Rectangle {
|
|||
PropertyChanges { target: powerFrame; opacity: 1}
|
||||
PropertyChanges { target: sessionFrame; opacity: 0}
|
||||
PropertyChanges { target: userFrame; opacity: 0}
|
||||
PropertyChanges { target: bgBlur; radius: 20}
|
||||
PropertyChanges { target: bgBlur; radius: 30}
|
||||
},
|
||||
State {
|
||||
name: "stateSession"
|
||||
|
@ -33,7 +33,7 @@ Rectangle {
|
|||
PropertyChanges { target: powerFrame; opacity: 0}
|
||||
PropertyChanges { target: sessionFrame; opacity: 1}
|
||||
PropertyChanges { target: userFrame; opacity: 0}
|
||||
PropertyChanges { target: bgBlur; radius: 20}
|
||||
PropertyChanges { target: bgBlur; radius: 30}
|
||||
},
|
||||
State {
|
||||
name: "stateUser"
|
||||
|
@ -41,7 +41,7 @@ Rectangle {
|
|||
PropertyChanges { target: powerFrame; opacity: 0}
|
||||
PropertyChanges { target: sessionFrame; opacity: 0}
|
||||
PropertyChanges { target: userFrame; opacity: 1}
|
||||
PropertyChanges { target: bgBlur; radius: 20}
|
||||
PropertyChanges { target: bgBlur; radius: 30}
|
||||
},
|
||||
State {
|
||||
name: "stateLogin"
|
||||
|
@ -54,7 +54,7 @@ Rectangle {
|
|||
|
||||
]
|
||||
transitions: Transition {
|
||||
// PropertyAnimation { duration: 300; properties: "opacity"; }
|
||||
PropertyAnimation { duration: 100; properties: "opacity"; }
|
||||
PropertyAnimation { duration: 300; properties: "radius"; }
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ Rectangle {
|
|||
source: config.background
|
||||
fillMode: Image.Tile
|
||||
onStatusChanged: {
|
||||
if (status == Image.Error && source != config.defaultBackground) {
|
||||
if (status == Image.Error && source !== config.defaultBackground) {
|
||||
source = config.defaultBackground
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ Rectangle {
|
|||
width: parent.width
|
||||
height: parent.height / 3
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: parent.height / 6
|
||||
anchors.topMargin: parent.height / 5
|
||||
|
||||
PowerFrame {
|
||||
id: powerFrame
|
||||
|
@ -221,7 +221,7 @@ Rectangle {
|
|||
width: m_powerButtonSize
|
||||
height: m_powerButtonSize
|
||||
visible: sessionFrame.isMultipleSessions()
|
||||
source: sessionFrame.getCurrentSessionIconPath()
|
||||
source: sessionFrame.getCurrentSessionIconIndicator()
|
||||
onClicked: root.state = "stateSession"
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ Item {
|
|||
Row {
|
||||
spacing: 70
|
||||
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Item {
|
||||
width: 100
|
||||
|
|
|
@ -19,8 +19,8 @@ Item {
|
|||
return "unknow"
|
||||
}
|
||||
|
||||
function getCurrentSessionIconPath() {
|
||||
return sessionList.currentItem.iconPath
|
||||
function getCurrentSessionIconIndicator() {
|
||||
return sessionList.currentItem.iconIndicator;
|
||||
}
|
||||
|
||||
function isMultipleSessions() {
|
||||
|
@ -36,19 +36,24 @@ Item {
|
|||
currentIndex: sessionModel.lastIndex
|
||||
orientation: ListView.Horizontal
|
||||
delegate: Item {
|
||||
property string iconPath: iconButton.normalImg
|
||||
property string iconIndicator: iconButton.indicator
|
||||
|
||||
width: 150
|
||||
height: 120
|
||||
width: 250
|
||||
height: 150
|
||||
|
||||
ImageButton {
|
||||
id: iconButton
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
property var prefix: ("icons/%1_indicator_").arg(getIconName(name));
|
||||
width: 100
|
||||
height: 100
|
||||
normalImg: ("%1normal.png").arg(prefix)
|
||||
hoverImg: ("%1hover.png").arg(prefix)
|
||||
pressImg: ("%1press.png").arg(prefix)
|
||||
|
||||
property var prefix: ("icons/sessionicon/%1_").arg(getIconName(name));
|
||||
property var indicator: ("icons/%1_indicator_normal.png").arg(getIconName(name));
|
||||
|
||||
onClicked: {
|
||||
selected(index)
|
||||
sessionList.currentIndex = index
|
||||
|
|
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7.1 KiB |