mirror of
				https://github.com/arcan1s/netctl-gui.git
				synced 2025-11-04 07:23:40 +00:00 
			
		
		
		
	update interface painting
This commit is contained in:
		@ -26,6 +26,8 @@ Item {
 | 
				
			|||||||
    id: aboutPage
 | 
					    id: aboutPage
 | 
				
			||||||
    width: childrenRect.width
 | 
					    width: childrenRect.width
 | 
				
			||||||
    height: childrenRect.height
 | 
					    height: childrenRect.height
 | 
				
			||||||
 | 
					    implicitWidth: pageColumn.implicitWidth
 | 
				
			||||||
 | 
					    implicitHeight: pageColumn.implicitHeight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property bool debug: NetctlAdds.isDebugEnabled()
 | 
					    property bool debug: NetctlAdds.isDebugEnabled()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -59,7 +61,6 @@ Item {
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    QtControls.Label {
 | 
					                    QtControls.Label {
 | 
				
			||||||
                        anchors.top: parent.top
 | 
					 | 
				
			||||||
                        QtLayouts.Layout.fillWidth: true
 | 
					                        QtLayouts.Layout.fillWidth: true
 | 
				
			||||||
                        font.capitalization: Font.SmallCaps
 | 
					                        font.capitalization: Font.SmallCaps
 | 
				
			||||||
                        horizontalAlignment: Text.AlignHCenter
 | 
					                        horizontalAlignment: Text.AlignHCenter
 | 
				
			||||||
 | 
				
			|||||||
@ -258,17 +258,12 @@ Item {
 | 
				
			|||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
                id: activeIconButton
 | 
					                id: activeIconButton
 | 
				
			||||||
                text: i18n("Browse")
 | 
					                text: i18n("Browse")
 | 
				
			||||||
                onClicked: {
 | 
					                onClicked: activeFileDialog.visible = true
 | 
				
			||||||
                    // FIXME: more clean directory definition
 | 
					 | 
				
			||||||
                    var list = inactiveIcon.text.split('/')
 | 
					 | 
				
			||||||
                    list.pop()
 | 
					 | 
				
			||||||
                    activeFileDialog.folder = "/" + list.join('/')
 | 
					 | 
				
			||||||
                    activeFileDialog.visible = true
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: activeFileDialog
 | 
					                id: activeFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                nameFilters: [ "Image files (*.jpeg *.jpg *.png)", "All files (*)" ]
 | 
					                nameFilters: [ "Image files (*.jpeg *.jpg *.png)", "All files (*)" ]
 | 
				
			||||||
                selectExisting: true
 | 
					                selectExisting: true
 | 
				
			||||||
@ -295,17 +290,12 @@ Item {
 | 
				
			|||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
                id: inactiveIconButton
 | 
					                id: inactiveIconButton
 | 
				
			||||||
                text: i18n("Browse")
 | 
					                text: i18n("Browse")
 | 
				
			||||||
                onClicked: {
 | 
					                onClicked: inactiveFileDialog.visible = true
 | 
				
			||||||
                    // FIXME: more clean directory definition
 | 
					 | 
				
			||||||
                    var list = inactiveIcon.text.split('/')
 | 
					 | 
				
			||||||
                    list.pop()
 | 
					 | 
				
			||||||
                    inactiveFileDialog.folder = "/" + list.join('/')
 | 
					 | 
				
			||||||
                    inactiveFileDialog.visible = true
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: inactiveFileDialog
 | 
					                id: inactiveFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                nameFilters: [ "Image files (*.jpeg *.jpg *.png)", "All files (*)" ]
 | 
					                nameFilters: [ "Image files (*.jpeg *.jpg *.png)", "All files (*)" ]
 | 
				
			||||||
                selectExisting: true
 | 
					                selectExisting: true
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@ import QtQuick 2.0
 | 
				
			|||||||
import QtQuick.Controls 1.0 as QtControls
 | 
					import QtQuick.Controls 1.0 as QtControls
 | 
				
			||||||
import QtQuick.Dialogs 1.1 as QtDialogs
 | 
					import QtQuick.Dialogs 1.1 as QtDialogs
 | 
				
			||||||
import QtQuick.Layouts 1.0 as QtLayouts
 | 
					import QtQuick.Layouts 1.0 as QtLayouts
 | 
				
			||||||
 | 
					import QtQuick.Controls.Styles 1.3 as QtStyles
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.kde.plasma.private.netctl 1.0
 | 
					import org.kde.plasma.private.netctl 1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -27,6 +28,8 @@ Item {
 | 
				
			|||||||
    id: dataenginePage
 | 
					    id: dataenginePage
 | 
				
			||||||
    width: childrenRect.width
 | 
					    width: childrenRect.width
 | 
				
			||||||
    height: childrenRect.height
 | 
					    height: childrenRect.height
 | 
				
			||||||
 | 
					    implicitWidth: pageColumn.implicitWidth
 | 
				
			||||||
 | 
					    implicitHeight: pageColumn.implicitHeight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property bool debug: NetctlAdds.isDebugEnabled()
 | 
					    property bool debug: NetctlAdds.isDebugEnabled()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -40,7 +43,7 @@ Item {
 | 
				
			|||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
            QtControls.Label {
 | 
					            QtControls.Label {
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: parent.width * 2 / 5
 | 
				
			||||||
                horizontalAlignment: Text.AlignRight
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
                verticalAlignment: Text.AlignVCenter
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
                text: i18n("Path to netctl")
 | 
					                text: i18n("Path to netctl")
 | 
				
			||||||
@ -48,7 +51,7 @@ Item {
 | 
				
			|||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: netctlPath
 | 
					                id: netctlPath
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - netctlPathButton.width
 | 
					                width: parent.width * 3 / 5 - netctlPathButton.width
 | 
				
			||||||
                text: cfg_dataengine["NETCTLCMD"]
 | 
					                text: cfg_dataengine["NETCTLCMD"]
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -59,6 +62,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: netctlFileDialog
 | 
					                id: netctlFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -72,7 +76,7 @@ Item {
 | 
				
			|||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
            QtControls.Label {
 | 
					            QtControls.Label {
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: parent.width * 2 / 5
 | 
				
			||||||
                horizontalAlignment: Text.AlignRight
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
                verticalAlignment: Text.AlignVCenter
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
                text: i18n("Path to netctl-auto")
 | 
					                text: i18n("Path to netctl-auto")
 | 
				
			||||||
@ -80,7 +84,7 @@ Item {
 | 
				
			|||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: netctlAutoPath
 | 
					                id: netctlAutoPath
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - netctlAutoPathButton.width
 | 
					                width: parent.width * 3 / 5 - netctlAutoPathButton.width
 | 
				
			||||||
                text: cfg_dataengine["NETCTLAUTOCMD"]
 | 
					                text: cfg_dataengine["NETCTLAUTOCMD"]
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -91,6 +95,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: netctlAutoFileDialog
 | 
					                id: netctlAutoFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -102,18 +107,41 @@ Item {
 | 
				
			|||||||
        Row {
 | 
					        Row {
 | 
				
			||||||
            height: implicitHeight
 | 
					            height: implicitHeight
 | 
				
			||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
 | 
					            QtControls.Label {
 | 
				
			||||||
 | 
					                height: parent.height
 | 
				
			||||||
 | 
					                width: parent.width * 2 / 5 - extIp4.width
 | 
				
			||||||
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
 | 
					                text: i18n("Check external IPv4")
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            QtControls.CheckBox {
 | 
					            QtControls.CheckBox {
 | 
				
			||||||
                id: extIp4
 | 
					                id: extIp4
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: implicitWidth
 | 
				
			||||||
                text: i18n("Check external IPv4")
 | 
					 | 
				
			||||||
                checked: cfg_dataengine["EXTIP4"] == "true"
 | 
					                checked: cfg_dataengine["EXTIP4"] == "true"
 | 
				
			||||||
 | 
					                style: QtStyles.CheckBoxStyle {
 | 
				
			||||||
 | 
					                    indicator: Rectangle {
 | 
				
			||||||
 | 
					                        implicitWidth: 16
 | 
				
			||||||
 | 
					                        implicitHeight: 16
 | 
				
			||||||
 | 
					                        radius: 3
 | 
				
			||||||
 | 
					                        border.width: 1
 | 
				
			||||||
 | 
					                        border.color: control.activeFocus ? "darkblue" : "gray"
 | 
				
			||||||
 | 
					                        Rectangle {
 | 
				
			||||||
 | 
					                            visible: control.checked
 | 
				
			||||||
 | 
					                            radius: 1
 | 
				
			||||||
 | 
					                            anchors.fill: parent
 | 
				
			||||||
 | 
					                            anchors.margins: 4
 | 
				
			||||||
 | 
					                            color: "#555555"
 | 
				
			||||||
 | 
					                            border.color: "#333333"
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: extIp4Path
 | 
					                id: extIp4Path
 | 
				
			||||||
                enabled: extIp4.checked
 | 
					                enabled: extIp4.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - extIp4PathButton.width
 | 
					                width: parent.width * 3 / 5 - extIp4PathButton.width
 | 
				
			||||||
                text: cfg_dataengine["EXTIP4CMD"]
 | 
					                text: cfg_dataengine["EXTIP4CMD"]
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -125,6 +153,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: extIp4FileDialog
 | 
					                id: extIp4FileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -136,18 +165,41 @@ Item {
 | 
				
			|||||||
        Row {
 | 
					        Row {
 | 
				
			||||||
            height: implicitHeight
 | 
					            height: implicitHeight
 | 
				
			||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
 | 
					            QtControls.Label {
 | 
				
			||||||
 | 
					                height: parent.height
 | 
				
			||||||
 | 
					                width: parent.width * 2 / 5 - extIp6.width
 | 
				
			||||||
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
 | 
					                text: i18n("Check external IPv6")
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            QtControls.CheckBox {
 | 
					            QtControls.CheckBox {
 | 
				
			||||||
                id: extIp6
 | 
					                id: extIp6
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: implicitWidth
 | 
				
			||||||
                text: i18n("Check external IPv6")
 | 
					 | 
				
			||||||
                checked: cfg_dataengine["EXTIP6"] == "true"
 | 
					                checked: cfg_dataengine["EXTIP6"] == "true"
 | 
				
			||||||
 | 
					                style: QtStyles.CheckBoxStyle {
 | 
				
			||||||
 | 
					                    indicator: Rectangle {
 | 
				
			||||||
 | 
					                        implicitWidth: 16
 | 
				
			||||||
 | 
					                        implicitHeight: 16
 | 
				
			||||||
 | 
					                        radius: 3
 | 
				
			||||||
 | 
					                        border.width: 1
 | 
				
			||||||
 | 
					                        border.color: control.activeFocus ? "darkblue" : "gray"
 | 
				
			||||||
 | 
					                        Rectangle {
 | 
				
			||||||
 | 
					                            visible: control.checked
 | 
				
			||||||
 | 
					                            radius: 1
 | 
				
			||||||
 | 
					                            anchors.fill: parent
 | 
				
			||||||
 | 
					                            anchors.margins: 4
 | 
				
			||||||
 | 
					                            color: "#555555"
 | 
				
			||||||
 | 
					                            border.color: "#333333"
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: extIp6Path
 | 
					                id: extIp6Path
 | 
				
			||||||
                enabled: extIp6.checked
 | 
					                enabled: extIp6.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - extIp6PathButton.width
 | 
					                width: parent.width * 3 / 5 - extIp6PathButton.width
 | 
				
			||||||
                text: cfg_dataengine["EXTIP6CMD"]
 | 
					                text: cfg_dataengine["EXTIP6CMD"]
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -159,6 +211,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: extIp6FileDialog
 | 
					                id: extIp6FileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
 | 
				
			|||||||
@ -53,6 +53,7 @@ Item {
 | 
				
			|||||||
        "current": "N\\A",
 | 
					        "current": "N\\A",
 | 
				
			||||||
        "extip4": "127.0.0.1",
 | 
					        "extip4": "127.0.0.1",
 | 
				
			||||||
        "extip6": "::1",
 | 
					        "extip6": "::1",
 | 
				
			||||||
 | 
					        "info": "N\\A",
 | 
				
			||||||
        "intip4": "127.0.0.1",
 | 
					        "intip4": "127.0.0.1",
 | 
				
			||||||
        "intip6": "::1",
 | 
					        "intip6": "::1",
 | 
				
			||||||
        "interfaces": "lo",
 | 
					        "interfaces": "lo",
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@ import QtQuick 2.0
 | 
				
			|||||||
import QtQuick.Controls 1.3 as QtControls
 | 
					import QtQuick.Controls 1.3 as QtControls
 | 
				
			||||||
import QtQuick.Dialogs 1.1 as QtDialogs
 | 
					import QtQuick.Dialogs 1.1 as QtDialogs
 | 
				
			||||||
import QtQuick.Layouts 1.0 as QtLayouts
 | 
					import QtQuick.Layouts 1.0 as QtLayouts
 | 
				
			||||||
 | 
					import QtQuick.Controls.Styles 1.3 as QtStyles
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.kde.plasma.private.netctl 1.0
 | 
					import org.kde.plasma.private.netctl 1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -27,6 +28,8 @@ Item {
 | 
				
			|||||||
    id: widgetPage
 | 
					    id: widgetPage
 | 
				
			||||||
    width: childrenRect.width
 | 
					    width: childrenRect.width
 | 
				
			||||||
    height: childrenRect.height
 | 
					    height: childrenRect.height
 | 
				
			||||||
 | 
					    implicitWidth: pageColumn.implicitWidth
 | 
				
			||||||
 | 
					    implicitHeight: pageColumn.implicitHeight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property bool debug: NetctlAdds.isDebugEnabled()
 | 
					    property bool debug: NetctlAdds.isDebugEnabled()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -51,15 +54,14 @@ Item {
 | 
				
			|||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
            QtControls.Label {
 | 
					            QtControls.Label {
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: parent.width * 2 / 5
 | 
				
			||||||
                horizontalAlignment: Text.AlignRight
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
                verticalAlignment: Text.AlignVCenter
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
                text: i18n("Auto update interval, msec")
 | 
					                text: i18n("Auto update interval, msec")
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.SpinBox {
 | 
					            QtControls.SpinBox {
 | 
				
			||||||
                id: autoUpdate
 | 
					                id: autoUpdate
 | 
				
			||||||
                height: parent.height
 | 
					                width: parent.width * 3 / 5
 | 
				
			||||||
                width: parent.width * 2 / 3
 | 
					 | 
				
			||||||
                minimumValue: 1000
 | 
					                minimumValue: 1000
 | 
				
			||||||
                maximumValue: 10000
 | 
					                maximumValue: 10000
 | 
				
			||||||
                stepSize: 500
 | 
					                stepSize: 500
 | 
				
			||||||
@ -72,7 +74,7 @@ Item {
 | 
				
			|||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
            QtControls.Label {
 | 
					            QtControls.Label {
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: parent.width * 2 / 5
 | 
				
			||||||
                horizontalAlignment: Text.AlignRight
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
                verticalAlignment: Text.AlignVCenter
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
                text: i18n("Path to GUI")
 | 
					                text: i18n("Path to GUI")
 | 
				
			||||||
@ -80,7 +82,7 @@ Item {
 | 
				
			|||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: guiPath
 | 
					                id: guiPath
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - guiPathButton.width
 | 
					                width: parent.width * 3 / 5 - guiPathButton.width
 | 
				
			||||||
                text: plasmoid.configuration.guiPath
 | 
					                text: plasmoid.configuration.guiPath
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -91,6 +93,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: guiFileDialog
 | 
					                id: guiFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -102,17 +105,40 @@ Item {
 | 
				
			|||||||
        Row {
 | 
					        Row {
 | 
				
			||||||
            height: implicitHeight
 | 
					            height: implicitHeight
 | 
				
			||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
 | 
					            QtControls.Label {
 | 
				
			||||||
 | 
					                height: parent.height
 | 
				
			||||||
 | 
					                width: parent.width * 2 / 5 - useHelper.width
 | 
				
			||||||
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
 | 
					                text: i18n("Use helper")
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            QtControls.CheckBox {
 | 
					            QtControls.CheckBox {
 | 
				
			||||||
                id: useHelper
 | 
					                id: useHelper
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: implicitWidth
 | 
				
			||||||
                text: i18n("Use helper")
 | 
					                style: QtStyles.CheckBoxStyle {
 | 
				
			||||||
 | 
					                    indicator: Rectangle {
 | 
				
			||||||
 | 
					                        implicitWidth: 16
 | 
				
			||||||
 | 
					                        implicitHeight: 16
 | 
				
			||||||
 | 
					                        radius: 3
 | 
				
			||||||
 | 
					                        border.width: 1
 | 
				
			||||||
 | 
					                        border.color: control.activeFocus ? "darkblue" : "gray"
 | 
				
			||||||
 | 
					                        Rectangle {
 | 
				
			||||||
 | 
					                            visible: control.checked
 | 
				
			||||||
 | 
					                            radius: 1
 | 
				
			||||||
 | 
					                            anchors.fill: parent
 | 
				
			||||||
 | 
					                            anchors.margins: 4
 | 
				
			||||||
 | 
					                            color: "#555555"
 | 
				
			||||||
 | 
					                            border.color: "#333333"
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: helperPath
 | 
					                id: helperPath
 | 
				
			||||||
                enabled: useHelper.checked
 | 
					                enabled: useHelper.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - helperPathButton.width
 | 
					                width: parent.width * 3 / 5 - helperPathButton.width
 | 
				
			||||||
                text: plasmoid.configuration.helperPath
 | 
					                text: plasmoid.configuration.helperPath
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -137,25 +163,28 @@ Item {
 | 
				
			|||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
            QtControls.Label {
 | 
					            QtControls.Label {
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: parent.width * 2 / 5
 | 
				
			||||||
                horizontalAlignment: Text.AlignRight
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
                verticalAlignment: Text.AlignVCenter
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
                text: i18n("Path to netctl")
 | 
					                text: i18n("Path to netctl")
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: netctlPath
 | 
					                id: netctlPath
 | 
				
			||||||
 | 
					                enabled: !useHelper.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - netctlPathButton.width
 | 
					                width: parent.width * 3 / 5 - netctlPathButton.width
 | 
				
			||||||
                text: plasmoid.configuration.netctlPath
 | 
					                text: plasmoid.configuration.netctlPath
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
                id: netctlPathButton
 | 
					                id: netctlPathButton
 | 
				
			||||||
 | 
					                enabled: !useHelper.checked
 | 
				
			||||||
                text: i18n("Browse")
 | 
					                text: i18n("Browse")
 | 
				
			||||||
                onClicked: netctlFileDialog.visible = true
 | 
					                onClicked: netctlFileDialog.visible = true
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: netctlFileDialog
 | 
					                id: netctlFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -169,25 +198,28 @@ Item {
 | 
				
			|||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
            QtControls.Label {
 | 
					            QtControls.Label {
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: parent.width * 2 / 5
 | 
				
			||||||
                horizontalAlignment: Text.AlignRight
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
                verticalAlignment: Text.AlignVCenter
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
                text: i18n("Path to netctl-auto")
 | 
					                text: i18n("Path to netctl-auto")
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: netctlAutoPath
 | 
					                id: netctlAutoPath
 | 
				
			||||||
 | 
					                enabled: !useHelper.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - netctlAutoPathButton.width
 | 
					                width: parent.width * 3 / 5 - netctlAutoPathButton.width
 | 
				
			||||||
                text: plasmoid.configuration.netctlAutoPath
 | 
					                text: plasmoid.configuration.netctlAutoPath
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
                id: netctlAutoPathButton
 | 
					                id: netctlAutoPathButton
 | 
				
			||||||
 | 
					                enabled: !useHelper.checked
 | 
				
			||||||
                text: i18n("Browse")
 | 
					                text: i18n("Browse")
 | 
				
			||||||
                onClicked: netctlAutoFileDialog.visible = true
 | 
					                onClicked: netctlAutoFileDialog.visible = true
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: netctlAutoFileDialog
 | 
					                id: netctlAutoFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -199,17 +231,40 @@ Item {
 | 
				
			|||||||
        Row {
 | 
					        Row {
 | 
				
			||||||
            height: implicitHeight
 | 
					            height: implicitHeight
 | 
				
			||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
 | 
					            QtControls.Label {
 | 
				
			||||||
 | 
					                height: parent.height
 | 
				
			||||||
 | 
					                width: parent.width * 2 / 5 - useSudo.width
 | 
				
			||||||
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
 | 
					                text: i18n("Use sudo for netctl")
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            QtControls.CheckBox {
 | 
					            QtControls.CheckBox {
 | 
				
			||||||
                id: useSudo
 | 
					                id: useSudo
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: implicitWidth
 | 
				
			||||||
                text: i18n("Use sudo for netctl")
 | 
					                style: QtStyles.CheckBoxStyle {
 | 
				
			||||||
 | 
					                    indicator: Rectangle {
 | 
				
			||||||
 | 
					                        implicitWidth: 16
 | 
				
			||||||
 | 
					                        implicitHeight: 16
 | 
				
			||||||
 | 
					                        radius: 3
 | 
				
			||||||
 | 
					                        border.width: 1
 | 
				
			||||||
 | 
					                        border.color: control.activeFocus ? "darkblue" : "gray"
 | 
				
			||||||
 | 
					                        Rectangle {
 | 
				
			||||||
 | 
					                            visible: control.checked
 | 
				
			||||||
 | 
					                            radius: 1
 | 
				
			||||||
 | 
					                            anchors.fill: parent
 | 
				
			||||||
 | 
					                            anchors.margins: 4
 | 
				
			||||||
 | 
					                            color: "#555555"
 | 
				
			||||||
 | 
					                            border.color: "#333333"
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: sudoPath
 | 
					                id: sudoPath
 | 
				
			||||||
                enabled: useSudo.checked
 | 
					                enabled: useSudo.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - sudoPathButton.width
 | 
					                width: parent.width * 3 / 5 - sudoPathButton.width
 | 
				
			||||||
                text: plasmoid.configuration.sudoPath
 | 
					                text: plasmoid.configuration.sudoPath
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -221,6 +276,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: sudoFileDialog
 | 
					                id: sudoFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
@ -232,17 +288,40 @@ Item {
 | 
				
			|||||||
        Row {
 | 
					        Row {
 | 
				
			||||||
            height: implicitHeight
 | 
					            height: implicitHeight
 | 
				
			||||||
            width: parent.width
 | 
					            width: parent.width
 | 
				
			||||||
 | 
					            QtControls.Label {
 | 
				
			||||||
 | 
					                height: parent.height
 | 
				
			||||||
 | 
					                width: parent.width * 2 / 5 - useWifi.width
 | 
				
			||||||
 | 
					                horizontalAlignment: Text.AlignRight
 | 
				
			||||||
 | 
					                verticalAlignment: Text.AlignVCenter
 | 
				
			||||||
 | 
					                text: i18n("Show 'Start WiFi menu'")
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            QtControls.CheckBox {
 | 
					            QtControls.CheckBox {
 | 
				
			||||||
                id: useWifi
 | 
					                id: useWifi
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width / 3
 | 
					                width: implicitWidth
 | 
				
			||||||
                text: i18n("Show 'Start WiFi menu'")
 | 
					                style: QtStyles.CheckBoxStyle {
 | 
				
			||||||
 | 
					                    indicator: Rectangle {
 | 
				
			||||||
 | 
					                        implicitWidth: 16
 | 
				
			||||||
 | 
					                        implicitHeight: 16
 | 
				
			||||||
 | 
					                        radius: 3
 | 
				
			||||||
 | 
					                        border.width: 1
 | 
				
			||||||
 | 
					                        border.color: control.activeFocus ? "darkblue" : "gray"
 | 
				
			||||||
 | 
					                        Rectangle {
 | 
				
			||||||
 | 
					                            visible: control.checked
 | 
				
			||||||
 | 
					                            radius: 1
 | 
				
			||||||
 | 
					                            anchors.fill: parent
 | 
				
			||||||
 | 
					                            anchors.margins: 4
 | 
				
			||||||
 | 
					                            color: "#555555"
 | 
				
			||||||
 | 
					                            border.color: "#333333"
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.TextField {
 | 
					            QtControls.TextField {
 | 
				
			||||||
                id: wifiPath
 | 
					                id: wifiPath
 | 
				
			||||||
                enabled: useWifi.checked
 | 
					                enabled: useWifi.checked
 | 
				
			||||||
                height: parent.height
 | 
					                height: parent.height
 | 
				
			||||||
                width: parent.width * 2 / 3 - wifiPathButton.width
 | 
					                width: parent.width * 3 / 5 - wifiPathButton.width
 | 
				
			||||||
                text: plasmoid.configuration.wifiPath
 | 
					                text: plasmoid.configuration.wifiPath
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            QtControls.Button {
 | 
					            QtControls.Button {
 | 
				
			||||||
@ -254,6 +333,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            QtDialogs.FileDialog {
 | 
					            QtDialogs.FileDialog {
 | 
				
			||||||
                id: wifiFileDialog
 | 
					                id: wifiFileDialog
 | 
				
			||||||
 | 
					                modality: Qt.NonModal
 | 
				
			||||||
                title: i18n("Select a path")
 | 
					                title: i18n("Select a path")
 | 
				
			||||||
                folder: "/usr/bin"
 | 
					                folder: "/usr/bin"
 | 
				
			||||||
                nameFilters: [ "All files (*)" ]
 | 
					                nameFilters: [ "All files (*)" ]
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user