Update layout and element's position

This commit is contained in:
杨万青 2016-04-07 20:10:16 +08:00
parent 9eff1c469e
commit a0955107eb
27 changed files with 20 additions and 14 deletions

View File

@ -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"
}

View File

@ -10,7 +10,8 @@ Item {
Row {
spacing: 70
anchors.centerIn: parent
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
Item {
width: 100

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
icons/sessionicon/gnome_hover.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
icons/sessionicon/gnome_press.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/sessionicon/kde_hover.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
icons/sessionicon/kde_normal.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
icons/sessionicon/kde_press.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
icons/sessionicon/lxde_hover.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
icons/sessionicon/lxde_press.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
icons/sessionicon/xfce_hover.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
icons/sessionicon/xfce_normal.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
icons/sessionicon/xfce_press.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB