mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
try to paint more pretty interface
This commit is contained in:
parent
54c5e7958a
commit
634b4c3b41
@ -29,8 +29,12 @@ Item {
|
||||
|
||||
property bool debug: NetctlAdds.isDebugEnabled()
|
||||
|
||||
Grid {
|
||||
Column {
|
||||
id: pageColumn
|
||||
width: units.gridUnit * 25
|
||||
QtControls.TabView {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
QtControls.Tab {
|
||||
title: i18n("About")
|
||||
|
||||
@ -55,6 +59,7 @@ Item {
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
anchors.top: parent.top
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
font.capitalization: Font.SmallCaps
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
@ -16,7 +16,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.0 as QtControls
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Controls.Styles 1.3 as QtStyles
|
||||
import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import QtQuick.Layouts 1.0 as QtLayouts
|
||||
@ -28,6 +28,8 @@ Item {
|
||||
id: appearancePage
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
implicitWidth: pageColumn.implicitWidth
|
||||
implicitHeight: pageColumn.implicitHeight
|
||||
|
||||
property bool debug: NetctlAdds.isDebugEnabled()
|
||||
property variant weight: {
|
||||
@ -48,13 +50,22 @@ Item {
|
||||
property alias cfg_inactiveIconPath: inactiveIcon.text
|
||||
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
QtLayouts.RowLayout {
|
||||
Column {
|
||||
id: pageColumn
|
||||
width: units.gridUnit * 25
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Text align")
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
id: textAlign
|
||||
width: parent.width * 2 / 3
|
||||
textRole: "label"
|
||||
model: [
|
||||
{
|
||||
@ -85,36 +96,57 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: selectFont
|
||||
width: parent.width * 2 / 3
|
||||
text: plasmoid.configuration.fontFamily
|
||||
onClicked: fontDialog.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font size")
|
||||
}
|
||||
QtControls.SpinBox {
|
||||
id: fontSize
|
||||
width: parent.width * 2 / 3
|
||||
minimumValue: 8
|
||||
maximumValue: 24
|
||||
maximumValue: 32
|
||||
stepSize: 1
|
||||
value: plasmoid.configuration.fontSize
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font weight")
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
id: fontWeight
|
||||
width: parent.width * 2 / 3
|
||||
textRole: "label"
|
||||
model: [
|
||||
{
|
||||
@ -149,12 +181,19 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font style")
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
id: fontStyle
|
||||
width: parent.width * 2 / 3
|
||||
textRole: "label"
|
||||
model: [
|
||||
{
|
||||
@ -177,12 +216,19 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: selectColor
|
||||
width: parent.width * 2 / 3
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.fontColor
|
||||
@ -193,16 +239,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Active icon")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: activeIcon
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - activeIconButton.width
|
||||
text: plasmoid.configuration.activeIconPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: activeIconButton
|
||||
text: i18n("Browse")
|
||||
onClicked: {
|
||||
// FIXME: more clean directory definition
|
||||
@ -222,16 +276,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Inactive icon")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: inactiveIcon
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - inactiveIconButton.width
|
||||
text: plasmoid.configuration.inactiveIconPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: inactiveIconButton
|
||||
text: i18n("Browse")
|
||||
onClicked: {
|
||||
// FIXME: more clean directory definition
|
||||
|
@ -32,17 +32,27 @@ Item {
|
||||
|
||||
property variant cfg_dataengine: NetctlAdds.readDataEngineConfiguration()
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
QtLayouts.RowLayout {
|
||||
Column {
|
||||
id: pageColumn
|
||||
width: units.gridUnit * 25
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to netctl")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: netctlPath
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - netctlPathButton.width
|
||||
text: cfg_dataengine["NETCTLCMD"]
|
||||
}
|
||||
QtControls.Button {
|
||||
id: netctlPathButton
|
||||
text: i18n("Browse")
|
||||
onClicked: netctlFileDialog.visible = true
|
||||
}
|
||||
@ -57,16 +67,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to netctl-auto")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: netctlAutoPath
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - netctlAutoPathButton.width
|
||||
text: cfg_dataengine["NETCTLAUTOCMD"]
|
||||
}
|
||||
QtControls.Button {
|
||||
id: netctlAutoPathButton
|
||||
text: i18n("Browse")
|
||||
onClicked: netctlAutoFileDialog.visible = true
|
||||
}
|
||||
@ -81,19 +99,25 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.CheckBox {
|
||||
id: extIp4
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Check external IPv4")
|
||||
checked: cfg_dataengine["EXTIP4"] == "true"
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: extIp4Path
|
||||
enabled: extIp4.checked
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - extIp4PathButton.width
|
||||
text: cfg_dataengine["EXTIP4CMD"]
|
||||
}
|
||||
QtControls.Button {
|
||||
id: extIp4PathButton
|
||||
enabled: extIp4.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: extIp4FileDialog.visible = true
|
||||
@ -109,19 +133,25 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.CheckBox {
|
||||
id: extIp6
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Check external IPv6")
|
||||
checked: cfg_dataengine["EXTIP6"] == "true"
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: extIp6Path
|
||||
enabled: extIp6.checked
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - extIp6PathButton.width
|
||||
text: cfg_dataengine["EXTIP6CMD"]
|
||||
}
|
||||
QtControls.Button {
|
||||
id: extIp6PathButton
|
||||
enabled: extIp6.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: extIp6FileDialog.visible = true
|
||||
|
@ -16,7 +16,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.0 as QtControls
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import QtQuick.Layouts 1.0 as QtLayouts
|
||||
|
||||
@ -43,13 +43,23 @@ Item {
|
||||
property alias cfg_textPattern: textPattern.text
|
||||
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
QtLayouts.RowLayout {
|
||||
Column {
|
||||
id: pageColumn
|
||||
width: units.gridUnit * 25
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Auto update interval, msec")
|
||||
}
|
||||
QtControls.SpinBox {
|
||||
id: autoUpdate
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3
|
||||
minimumValue: 1000
|
||||
maximumValue: 10000
|
||||
stepSize: 500
|
||||
@ -57,16 +67,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to GUI")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: guiPath
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - guiPathButton.width
|
||||
text: plasmoid.configuration.guiPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: guiPathButton
|
||||
text: i18n("Browse")
|
||||
onClicked: guiFileDialog.visible = true
|
||||
}
|
||||
@ -81,18 +99,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.CheckBox {
|
||||
id: useHelper
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Use helper")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: helperPath
|
||||
enabled: useHelper.checked
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - helperPathButton.width
|
||||
text: plasmoid.configuration.helperPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: helperPathButton
|
||||
enabled: useHelper.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: helperFileDialog.visible = true
|
||||
@ -108,16 +132,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to netctl")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: netctlPath
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - netctlPathButton.width
|
||||
text: plasmoid.configuration.netctlPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: netctlPathButton
|
||||
text: i18n("Browse")
|
||||
onClicked: netctlFileDialog.visible = true
|
||||
}
|
||||
@ -132,16 +164,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Path to netctl-auto")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: netctlAutoPath
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - netctlAutoPathButton.width
|
||||
text: plasmoid.configuration.netctlAutoPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: netctlAutoPathButton
|
||||
text: i18n("Browse")
|
||||
onClicked: netctlAutoFileDialog.visible = true
|
||||
}
|
||||
@ -156,18 +196,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.CheckBox {
|
||||
id: useSudo
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Use sudo for netctl")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: sudoPath
|
||||
enabled: useSudo.checked
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - sudoPathButton.width
|
||||
text: plasmoid.configuration.sudoPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: sudoPathButton
|
||||
enabled: useSudo.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: sudoFileDialog.visible = true
|
||||
@ -183,18 +229,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.CheckBox {
|
||||
id: useWifi
|
||||
height: parent.height
|
||||
width: parent.width / 3
|
||||
text: i18n("Show 'Start WiFi menu'")
|
||||
}
|
||||
QtControls.TextField {
|
||||
id: wifiPath
|
||||
enabled: useWifi.checked
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 3 - wifiPathButton.width
|
||||
text: plasmoid.configuration.wifiPath
|
||||
}
|
||||
QtControls.Button {
|
||||
id: wifiPathButton
|
||||
enabled: useWifi.checked
|
||||
text: i18n("Browse")
|
||||
onClicked: wifiFileDialog.visible = true
|
||||
@ -212,7 +264,7 @@ Item {
|
||||
|
||||
QtControls.TextArea {
|
||||
id: textPattern
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
width: parent.width
|
||||
text: plasmoid.configuration.textPattern
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user