diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-09-28 13:26:04 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-11-22 10:41:18 +0000 |
commit | af3ec9e19133146ac2fbe4bed83696256d7556a2 (patch) | |
tree | 83035071505bf986f9ee5192ddb201b7ef864124 | |
parent | d1689e92a5a44653774f8ae4356665fdd53979f8 (diff) |
Improve network settings
Remove dynamically opening details, they don't work with several
"Wired" networks.
Task-number: QTBUG-63091
Change-Id: I740c7ef3ef3c367892a4534ff3bb4cb05c06f29a
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
-rw-r--r-- | src/settingsui/network/NetworkListView.qml | 42 | ||||
-rw-r--r-- | src/settingsui/network/NetworkSettings.qml | 1 |
2 files changed, 12 insertions, 31 deletions
diff --git a/src/settingsui/network/NetworkListView.qml b/src/settingsui/network/NetworkListView.qml index 7ea12b5..4bc54da 100644 --- a/src/settingsui/network/NetworkListView.qml +++ b/src/settingsui/network/NetworkListView.qml @@ -43,53 +43,38 @@ ListView { delegate: Item { id: networkDelegate width: list.width - height: expanded ? list.height * 0.15 + list.height * 0.05 : list.height * 0.15 - property bool expanded: false - MouseArea { - anchors.fill: parent - onClicked: networkDelegate.expanded = !networkDelegate.expanded - } - Rectangle { - id: img - height: parent.height * 0.6 - width: height - anchors.left: parent.left - anchors.leftMargin: parent.width * 0.075 - anchors.verticalCenter: parent.verticalCenter - } + height: list.height * 0.15 Column { - anchors.left: img.right - anchors.leftMargin: parent.width * 0.025 + anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter width: parent.width * 0.5 Text { id: networkName horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter - font.pixelSize: list.height * 0.06 + font.pixelSize: pluginMain.subTitleFontSize + font.family: appFont color: connected ? "#41cd52" : "white" text: name - font.family: appFont - font.styleName: connected ? "SemiBold" : "Regular" } Row { id: ipRow height: networkDelegate.height * 0.275 * opacity - opacity: networkDelegate.expanded ? 1 : 0.0 - visible: opacity > 0 spacing: networkDelegate.width * 0.0075 - Behavior on opacity { NumberAnimation { duration: 200} } + Item { + width: pluginMain.margin + height: 1 + } Text { id: ipAddressLabel height: parent.height anchors.verticalCenter: parent.verticalCenter text: qsTr("IP Address:") color: connected ? "#41cd52" : "white" - font.pixelSize: height * 0.8 + font.pixelSize: pluginMain.valueFontSize + font.family: appFont verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft - font.family: appFont - font.styleName: connected ? "SemiBold" : "Regular" } Text { id: ipAddress @@ -99,8 +84,8 @@ ListView { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft color: connected ? "#41cd52" : "white" - visible: ipRow.opacity > 0 text: connected ? NetworkSettingsManager.services.itemFromRow(index).ipv4.address : qsTr("Not connected") + font.pixelSize: pluginMain.valueFontSize font.family: appFont font.styleName: connected ? "SemiBold" : "Regular" } @@ -108,15 +93,12 @@ ListView { } QtButton { id: connectButton - height: list.height * 0.1 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter fillColor: connected ? "#9d9faa" : "#41cd52" borderColor: "transparent" text: connected ? qsTr("DISCONNECT") : qsTr("CONNECT") - opacity: expanded || connected ? 1.0 : 0.0 - visible: opacity > 0.0 - Behavior on opacity { NumberAnimation { duration: 200 } } + height: pluginMain.buttonHeight onClicked: { if (connected) { NetworkSettingsManager.services.itemFromRow(index).disconnectService(); diff --git a/src/settingsui/network/NetworkSettings.qml b/src/settingsui/network/NetworkSettings.qml index 8c7cf21..1f39d88 100644 --- a/src/settingsui/network/NetworkSettings.qml +++ b/src/settingsui/network/NetworkSettings.qml @@ -36,7 +36,6 @@ Item { NetworkListView { id: networkList anchors.top: parent.top - anchors.topMargin: parent.height * 0.025 anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom |