diff options
Diffstat (limited to 'homescreen/qml')
-rw-r--r-- | homescreen/qml/images/images.qrc | 2 | ||||
-rw-r--r-- | homescreen/qml/images/menubar_full_background.png | bin | 6608 -> 5705 bytes | |||
-rw-r--r-- | homescreen/qml/images/menubar_normal_background.png | bin | 68858 -> 71216 bytes | |||
-rw-r--r-- | homescreen/qml/images/split_switch.png | bin | 0 -> 1156 bytes | |||
-rw-r--r-- | homescreen/qml/images/split_switch_disable.png | bin | 0 -> 1296 bytes | |||
-rw-r--r-- | homescreen/qml/main.qml | 67 |
6 files changed, 59 insertions, 10 deletions
diff --git a/homescreen/qml/images/images.qrc b/homescreen/qml/images/images.qrc index e72f697..0715215 100644 --- a/homescreen/qml/images/images.qrc +++ b/homescreen/qml/images/images.qrc @@ -5,5 +5,7 @@ <file>menubar_full_background.png</file> <file>fullscreen.png</file> <file>normal.png</file> + <file>split_switch.png</file> + <file>split_switch_disable.png</file> </qresource> </RCC> diff --git a/homescreen/qml/images/menubar_full_background.png b/homescreen/qml/images/menubar_full_background.png Binary files differindex 16a7e77..6db3a9e 100644 --- a/homescreen/qml/images/menubar_full_background.png +++ b/homescreen/qml/images/menubar_full_background.png diff --git a/homescreen/qml/images/menubar_normal_background.png b/homescreen/qml/images/menubar_normal_background.png Binary files differindex bfffc55..dadafcf 100644 --- a/homescreen/qml/images/menubar_normal_background.png +++ b/homescreen/qml/images/menubar_normal_background.png diff --git a/homescreen/qml/images/split_switch.png b/homescreen/qml/images/split_switch.png Binary files differnew file mode 100644 index 0000000..751b2fa --- /dev/null +++ b/homescreen/qml/images/split_switch.png diff --git a/homescreen/qml/images/split_switch_disable.png b/homescreen/qml/images/split_switch_disable.png Binary files differnew file mode 100644 index 0000000..c4bfa67 --- /dev/null +++ b/homescreen/qml/images/split_switch_disable.png diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml index 10509fd..f523339 100644 --- a/homescreen/qml/main.qml +++ b/homescreen/qml/main.qml @@ -128,25 +128,20 @@ Window { } } - - - - Item { id: switchBtn - width: 110 - height: 110 + width: 61 + height: 61 anchors.right: parent.right + anchors.rightMargin: 17 anchors.top: parent.top + anchors.topMargin: 2 z: 1 Image { id: image width: 55 height: 55 - anchors.right: parent.right - anchors.rightMargin: 20 - anchors.top: parent.top - anchors.topMargin: 5 + anchors.centerIn: parent source: './images/normal.png' } @@ -162,16 +157,68 @@ Window { } } } + + Item { + id: splitSwitchBtn + width: 61 + height: 61 + anchors.right: switchBtn.left + anchors.top: parent.top + anchors.topMargin: 2 + z: 1 + property bool enableSplitSwitchBtn: false + Image { + id: splitSwitchImage + width: 55 + height: 55 + anchors.centerIn: parent + source: './images/split_switch_disable.png' + } + + MouseArea { + property bool changed : false + anchors.fill: parent + onClicked: { + if (splitSwitchBtn.enableSplitSwitchBtn) { + if(changed) { + switchSplitArea(0) + changed = false + } + else { + switchSplitArea(1) + changed = true + } + } + } + } + } + + function turnToFullscreen() { image.source = './images/fullscreen.png' container.state = 'fullscreen' container.opacity = 0.0 touchArea.switchArea(1) } + function turnToNormal() { image.source = './images/normal.png' container.state = 'normal' container.opacity = 1.0 touchArea.switchArea(0) } + + function enableSplitSwitchBtn() { + splitSwitchImage.source = './images/split_switch.png' + splitSwitchBtn.enableSplitSwitchBtn = true + } + + function disableSplitSwitchBtn() { + splitSwitchImage.source = './images/split_switch_disable.png' + splitSwitchBtn.enableSplitSwitchBtn = false; + } + + function switchSplitArea(val) { + homescreenHandler.changeLayout(val); + } } |