diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-02-14 14:16:56 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-02-19 16:39:18 +0200 |
commit | 7c9a7efac837e5f34d9bdb46b10422920bf99103 (patch) | |
tree | 47199a2df9cfabdfe78a6d068804565ad23ea925 /basicsuite/launchersettings/NetworkList.qml | |
parent | 9c7b85a73bfea7b92729ad9317b8f7a708412f4f (diff) |
[launcher settings] improve visual appearance
and fix the UI shrinking issue when vkb is visible.
Change-Id: I8609dbc4a852b04e3ed9f3fbd3eb1175f3576f5e
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'basicsuite/launchersettings/NetworkList.qml')
-rw-r--r-- | basicsuite/launchersettings/NetworkList.qml | 82 |
1 files changed, 28 insertions, 54 deletions
diff --git a/basicsuite/launchersettings/NetworkList.qml b/basicsuite/launchersettings/NetworkList.qml index 1f26537..b733eb6 100644 --- a/basicsuite/launchersettings/NetworkList.qml +++ b/basicsuite/launchersettings/NetworkList.qml @@ -39,8 +39,12 @@ ** ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Controls 1.0 import Qt.labs.wifi 0.1 +// ### TODO +// - only 1 delagate open at the time + Item { Component { id: listDelegate @@ -50,18 +54,16 @@ Item { property bool connected: wifiManager.connectedSSID == network.ssid property variant networkModel: model property alias ssidText: ssidLabel.text - height: expanded ? 300 : 70 + height: (expanded ? (connected ? 180: 260) : 70) clip: true // ### fixme + color: "#5C5C5C" + border.color: "black" + border.width: 1 Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } } width: parent.width - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: "lightgray" } - } - Text { id: ssidLabel anchors.top: parent.top @@ -69,6 +71,7 @@ Item { anchors.margins: 10 font.pixelSize: 20 font.bold: true + color: "#E6E6E6" text: network.ssid + (connected ? " (connected)" : ""); } @@ -79,7 +82,7 @@ Item { anchors.margins: 5 anchors.leftMargin: 40 text: network.bssid - color: "gray" + color: "#E6E6E6" font.pixelSize: ssidLabel.font.pixelSize * 0.5 } @@ -91,7 +94,7 @@ Item { + (network.supportsWPA ? "WPA " : "") + (network.supportsWEP ? "WEP " : "") + (network.supportsWPS ? "WPS " : ""); - color: "gray" + color: "#E6E6E6" font.pixelSize: ssidLabel.font.pixelSize * 0.5 font.italic: true } @@ -104,8 +107,8 @@ Item { anchors.margins: 20 anchors.right: parent.right anchors.top: parent.top - color: "lightblue" - border.color: "lightgray" + color: "#BF8888" + border.color: "#212126" } MouseArea { @@ -115,61 +118,32 @@ Item { } } - Rectangle { - id: passwordInputBackground - anchors.fill: passwordInput - anchors.margins: -5 - color: "white" - radius: 5 - border.color: "gray" - } - - TextInput { + TextField { id: passwordInput y: 100 - width: 300 height: 50 - text: "" + width: 300 + placeholderText: "Enter Password" + visible: !connected anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 18 } - Rectangle { - id: connectButton - anchors.top: passwordInput.bottom - anchors.margins: 20 + Button { + style: root.buttonStyle + y: passwordInput.visible ? passwordInput.y + passwordInput.height + 20 : passwordInput.y anchors.horizontalCenter: parent.horizontalCenter - width: passwordInput.width - height: passwordInputBackground.height - enabled: wifiManager.networkState != WifiManager.ObtainingIPAddress - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: buttonMouse.pressed ? "steelblue" : "lightsteelblue" } - } - - border.color: "gray" - - Text { - anchors.centerIn: parent - font.pixelSize: 24 - text: connected ? "Disconnect" : "Connect" - } - MouseArea { - id: buttonMouse - anchors.fill: parent - onClicked: { - networkView.currentIndex = index - if (connected) { - wifiManager.disconnect() - } else { - networkView.activeNetwork = networkView.currentItem - wifiManager.connect(network, passwordInput.text); - } + text: connected ? "Disconnect" : "Connect" + onClicked: { + networkView.currentIndex = index + if (connected) { + wifiManager.disconnect() + } else { + networkView.activeNetwork = networkView.currentItem + wifiManager.connect(network, passwordInput.text); } } } - } } |