From e552d5920590673fb391288ccf20ca0030916615 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Tue, 30 Jan 2018 12:04:41 +0200 Subject: Fix the appearance of network settings The radiobutton now seems to draw the indicator, even though it didn't do that before. Also, the texts in the buttons were not laid out properly. The image element was a remnant from earlier versions, so this simplifies the UI as well. Change-Id: I4c6238ae9b2d6011ea86c22ecd118e1b72638b00 Reviewed-by: Teemu Holappa --- src/settingsui/network/NetworkSettings.qml | 36 +++++++++++++----------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/settingsui/network/NetworkSettings.qml b/src/settingsui/network/NetworkSettings.qml index 947aae5..bb09954 100644 --- a/src/settingsui/network/NetworkSettings.qml +++ b/src/settingsui/network/NetworkSettings.qml @@ -76,33 +76,29 @@ Item { Layout.fillWidth: true implicitHeight: 54 + indicator: Item {} contentItem: Rectangle { color: checked ? "#80c342" : "white" border.color: "#bdbebf" border.width: 1 anchors.fill: parent - Row { - anchors.fill: parent - spacing: 10 - - Image { - id: typeId - height: parent.height - width: height + Column { + height: parent.height * .7 + width: parent.width + spacing: 0 + anchors.verticalCenter: parent.verticalCenter + Label { + width: parent.width + horizontalAlignment: Text.AlignHCenter + text: name } - Column { - height: parent.height * .7 - spacing: 0 - anchors.verticalCenter: parent.verticalCenter - Label { - text: name - } - Label { - text: ((type == NetworkSettingsType.Wired) && !NetworkSettingsManager.services.wiredNetworksAvailable) ? - qsTr("No networks") : networkSelect.stateToStr(modelData.state) - font.pixelSize: 12 - } + Label { + width: parent.width + horizontalAlignment: Text.AlignHCenter + text: ((type == NetworkSettingsType.Wired) && !NetworkSettingsManager.services.wiredNetworksAvailable) ? + qsTr("No networks") : networkSelect.stateToStr(modelData.state) + font.pixelSize: 12 } } } -- cgit v1.2.3