mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-12-16 07:23:41 +00:00
fix painting
update translations fix PKGBUILD
This commit is contained in:
@ -19,6 +19,7 @@ import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import QtQuick.Layouts 1.0 as QtLayouts
|
||||
import QtQuick.Controls.Styles 1.3 as QtStyles
|
||||
|
||||
import org.kde.plasma.private.netctl 1.0
|
||||
|
||||
@ -27,6 +28,8 @@ Item {
|
||||
id: widgetPage
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
implicitWidth: pageColumn.implicitWidth
|
||||
implicitHeight: pageColumn.implicitHeight
|
||||
|
||||
property bool debug: NetctlAdds.isDebugEnabled()
|
||||
|
||||
@ -51,15 +54,14 @@ Item {
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Auto update interval, msec")
|
||||
}
|
||||
QtControls.SpinBox {
|
||||
id: autoUpdate
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3
|
||||
width: parent.width * 3 / 5
|
||||
minimumValue: 1000
|
||||
maximumValue: 10000
|
||||
stepSize: 500
|
||||
@ -72,7 +74,7 @@ Item {
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to GUI")
|
||||
@ -80,7 +82,7 @@ Item {
|
||||
QtControls.TextField {
|
||||
id: guiPath
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - guiPathButton.width
|
||||
width: parent.width * 3 / 5 - guiPathButton.width
|
||||
text: plasmoid.configuration.guiPath
|
||||
}
|
||||
QtControls.Button {
|
||||
@ -91,6 +93,7 @@ Item {
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
id: guiFileDialog
|
||||
modality: Qt.NonModal
|
||||
title: i18n("Select a path")
|
||||
folder: "/usr/bin"
|
||||
nameFilters: [ "All files (*)" ]
|
||||
@ -102,17 +105,40 @@ Item {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
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 {
|
||||
id: useHelper
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Use helper")
|
||||
width: implicitWidth
|
||||
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 {
|
||||
id: helperPath
|
||||
enabled: useHelper.checked
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - helperPathButton.width
|
||||
width: parent.width * 3 / 5 - helperPathButton.width
|
||||
text: plasmoid.configuration.helperPath
|
||||
}
|
||||
QtControls.Button {
|
||||
@ -137,25 +163,28 @@ Item {
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to netctl")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: netctlPath
|
||||
enabled: !useHelper.checked
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - netctlPathButton.width
|
||||
width: parent.width * 3 / 5 - netctlPathButton.width
|
||||
text: plasmoid.configuration.netctlPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: netctlPathButton
|
||||
enabled: !useHelper.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: netctlFileDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
id: netctlFileDialog
|
||||
modality: Qt.NonModal
|
||||
title: i18n("Select a path")
|
||||
folder: "/usr/bin"
|
||||
nameFilters: [ "All files (*)" ]
|
||||
@ -169,25 +198,28 @@ Item {
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to netctl-auto")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: netctlAutoPath
|
||||
enabled: !useHelper.checked
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - netctlAutoPathButton.width
|
||||
width: parent.width * 3 / 5 - netctlAutoPathButton.width
|
||||
text: plasmoid.configuration.netctlAutoPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: netctlAutoPathButton
|
||||
enabled: !useHelper.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: netctlAutoFileDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
id: netctlAutoFileDialog
|
||||
modality: Qt.NonModal
|
||||
title: i18n("Select a path")
|
||||
folder: "/usr/bin"
|
||||
nameFilters: [ "All files (*)" ]
|
||||
@ -199,17 +231,40 @@ Item {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
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 {
|
||||
id: useSudo
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Use sudo for netctl")
|
||||
width: implicitWidth
|
||||
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 {
|
||||
id: sudoPath
|
||||
enabled: useSudo.checked
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - sudoPathButton.width
|
||||
width: parent.width * 3 / 5 - sudoPathButton.width
|
||||
text: plasmoid.configuration.sudoPath
|
||||
}
|
||||
QtControls.Button {
|
||||
@ -221,6 +276,7 @@ Item {
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
id: sudoFileDialog
|
||||
modality: Qt.NonModal
|
||||
title: i18n("Select a path")
|
||||
folder: "/usr/bin"
|
||||
nameFilters: [ "All files (*)" ]
|
||||
@ -232,17 +288,40 @@ Item {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
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 {
|
||||
id: useWifi
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Show 'Start WiFi menu'")
|
||||
width: implicitWidth
|
||||
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 {
|
||||
id: wifiPath
|
||||
enabled: useWifi.checked
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - wifiPathButton.width
|
||||
width: parent.width * 3 / 5 - wifiPathButton.width
|
||||
text: plasmoid.configuration.wifiPath
|
||||
}
|
||||
QtControls.Button {
|
||||
@ -254,6 +333,7 @@ Item {
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
id: wifiFileDialog
|
||||
modality: Qt.NonModal
|
||||
title: i18n("Select a path")
|
||||
folder: "/usr/bin"
|
||||
nameFilters: [ "All files (*)" ]
|
||||
|
||||
Reference in New Issue
Block a user