mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-06 18:35:52 +00:00
* more intuitive configuration UI
* add queueLimit runtime configuration
This commit is contained in:
@ -3,82 +3,82 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name=""/>
|
||||
<kcfgfile name=""/>
|
||||
|
||||
<group name="Widget">
|
||||
<!-- widget -->
|
||||
<entry name="text" type="string">
|
||||
<default>[$mark$number/$total: $name]</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Widget">
|
||||
<!-- widget -->
|
||||
<entry name="text" type="string">
|
||||
<default>[$mark$number/$total: $name]</default>
|
||||
</entry>
|
||||
</group>
|
||||
|
||||
<group name="Advanced">
|
||||
<!-- advanced -->
|
||||
<entry name="height" type="int">
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="width" type="int">
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="tooltipType" type="string">
|
||||
<default>windows</default>
|
||||
</entry>
|
||||
<entry name="tooltipWidth" type="int">
|
||||
<default>200</default>
|
||||
</entry>
|
||||
<entry name="tooltipColor" type="string">
|
||||
<default>#ffffff</default>
|
||||
</entry>
|
||||
<entry name="background" type="bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="verticalLayout" type="bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="mark" type="string">
|
||||
<default>¤</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Advanced">
|
||||
<!-- advanced -->
|
||||
<entry name="background" type="bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="verticalLayout" type="bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="height" type="int">
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="width" type="int">
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="mark" type="string">
|
||||
<default>¤</default>
|
||||
</entry>
|
||||
<entry name="tooltipType" type="string">
|
||||
<default>windows</default>
|
||||
</entry>
|
||||
<entry name="tooltipWidth" type="int">
|
||||
<default>200</default>
|
||||
</entry>
|
||||
<entry name="tooltipColor" type="string">
|
||||
<default>#ffffff</default>
|
||||
</entry>
|
||||
</group>
|
||||
|
||||
<group name="Appearance">
|
||||
<!-- appearance -->
|
||||
<entry name="textAlign" type="string">
|
||||
<default>center</default>
|
||||
</entry>
|
||||
<entry name="fontFamily" type="string">
|
||||
<default>Terminus</default>
|
||||
</entry>
|
||||
<entry name="fontSize" type="int">
|
||||
<default>12</default>
|
||||
</entry>
|
||||
<entry name="fontColor" type="string">
|
||||
<default>#000000</default>
|
||||
</entry>
|
||||
<entry name="fontWeight" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
<entry name="fontStyle" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
<!-- current -->
|
||||
<entry name="currentTextAlign" type="string">
|
||||
<default>center</default>
|
||||
</entry>
|
||||
<entry name="currentFontFamily" type="string">
|
||||
<default>Terminus</default>
|
||||
</entry>
|
||||
<entry name="currentFontSize" type="int">
|
||||
<default>12</default>
|
||||
</entry>
|
||||
<entry name="currentFontColor" type="string">
|
||||
<default>#ff0000</default>
|
||||
</entry>
|
||||
<entry name="currentFontWeight" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
<entry name="currentFontStyle" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Appearance">
|
||||
<!-- appearance -->
|
||||
<entry name="textAlign" type="string">
|
||||
<default>center</default>
|
||||
</entry>
|
||||
<entry name="fontFamily" type="string">
|
||||
<default>Terminus</default>
|
||||
</entry>
|
||||
<entry name="fontSize" type="int">
|
||||
<default>12</default>
|
||||
</entry>
|
||||
<entry name="fontColor" type="string">
|
||||
<default>#000000</default>
|
||||
</entry>
|
||||
<entry name="fontWeight" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
<entry name="fontStyle" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
<!-- current -->
|
||||
<entry name="currentTextAlign" type="string">
|
||||
<default>center</default>
|
||||
</entry>
|
||||
<entry name="currentFontFamily" type="string">
|
||||
<default>Terminus</default>
|
||||
</entry>
|
||||
<entry name="currentFontSize" type="int">
|
||||
<default>12</default>
|
||||
</entry>
|
||||
<entry name="currentFontColor" type="string">
|
||||
<default>#ff0000</default>
|
||||
</entry>
|
||||
<entry name="currentFontWeight" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
<entry name="currentFontStyle" type="string">
|
||||
<default>normal</default>
|
||||
</entry>
|
||||
</group>
|
||||
|
||||
</kcfg>
|
||||
|
@ -44,6 +44,7 @@ Item {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
QtControls.Tab {
|
||||
anchors.margins: 10.0
|
||||
title: i18n("About")
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
@ -86,6 +87,7 @@ Item {
|
||||
}
|
||||
|
||||
QtControls.Tab {
|
||||
anchors.margins: 10.0
|
||||
title: i18n("Acknowledgment")
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
@ -111,6 +113,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
}
|
||||
|
@ -236,6 +236,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
}
|
||||
|
@ -37,19 +37,47 @@ Item {
|
||||
|
||||
property bool debug: dpAdds.isDebugEnabled()
|
||||
|
||||
property alias cfg_background: background.checked
|
||||
property alias cfg_verticalLayout: verticalLayout.checked
|
||||
property alias cfg_height: widgetHeight.value
|
||||
property alias cfg_width: widgetWidth.value
|
||||
property string cfg_mark: mark.currentText
|
||||
property string cfg_tooltipType: tooltipType.currentText
|
||||
property alias cfg_tooltipWidth: tooltipWidth.value
|
||||
property alias cfg_tooltipColor: tooltipColor.text
|
||||
property alias cfg_background: background.checked
|
||||
property alias cfg_verticalLayout: verticalLayout.checked
|
||||
property string cfg_mark: mark.currentText
|
||||
|
||||
|
||||
Column {
|
||||
id: pageColumn
|
||||
anchors.fill: parent
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.heigth
|
||||
width: parent.width * 2 / 5
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: background
|
||||
width: parent.width * 3 / 5
|
||||
text: i18n("Enable background")
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.heigth
|
||||
width: parent.width * 2 / 5
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: verticalLayout
|
||||
width: parent.width * 3 / 5
|
||||
text: i18n("Vertical layout")
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
@ -90,126 +118,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Tooltip type")
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
id: tooltipType
|
||||
width: parent.width * 3 / 5
|
||||
textRole: "label"
|
||||
model: [
|
||||
{
|
||||
'label': i18n("contours"),
|
||||
'name': "contours"
|
||||
},
|
||||
{
|
||||
'label': i18n("windows"),
|
||||
'name': "windows"
|
||||
},
|
||||
{
|
||||
'label': i18n("clean desktop"),
|
||||
'name': "clean"
|
||||
},
|
||||
{
|
||||
'label': i18n("names"),
|
||||
'name': "names"
|
||||
},
|
||||
{
|
||||
'label': i18n("none"),
|
||||
'name': "none"
|
||||
}
|
||||
]
|
||||
onCurrentIndexChanged: cfg_tooltipType = model[currentIndex]["name"]
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
for (var i = 0; i < model.length; i++) {
|
||||
if (model[i]["name"] == plasmoid.configuration.tooltipType) {
|
||||
if (debug) console.info("Found", model[i]["name"], "on", i)
|
||||
tooltipType.currentIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Tooltip width")
|
||||
}
|
||||
QtControls.SpinBox {
|
||||
id: tooltipWidth
|
||||
width: parent.width * 3 / 5
|
||||
minimumValue: 100
|
||||
maximumValue: 1000
|
||||
stepSize: 50
|
||||
value: plasmoid.configuration.tooltipWidth
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: tooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.tooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.tooltipColor
|
||||
onClicked: colorDialog.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.heigth
|
||||
width: parent.width * 2 / 5
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: background
|
||||
width: parent.width * 3 / 5
|
||||
text: i18n("Enable background")
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.heigth
|
||||
width: parent.width * 2 / 5
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: verticalLayout
|
||||
width: parent.width * 3 / 5
|
||||
text: i18n("Vertical layout")
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
@ -230,6 +138,107 @@ Item {
|
||||
onCurrentIndexChanged: cfg_mark = currentText
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
title: i18n("Tooltip")
|
||||
Column {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Tooltip type")
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
id: tooltipType
|
||||
width: parent.width * 3 / 5
|
||||
textRole: "label"
|
||||
model: [
|
||||
{
|
||||
'label': i18n("contours"),
|
||||
'name': "contours"
|
||||
},
|
||||
{
|
||||
'label': i18n("windows"),
|
||||
'name': "windows"
|
||||
},
|
||||
{
|
||||
'label': i18n("clean desktop"),
|
||||
'name': "clean"
|
||||
},
|
||||
{
|
||||
'label': i18n("names"),
|
||||
'name': "names"
|
||||
},
|
||||
{
|
||||
'label': i18n("none"),
|
||||
'name': "none"
|
||||
}
|
||||
]
|
||||
onCurrentIndexChanged: cfg_tooltipType = model[currentIndex]["name"]
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
for (var i = 0; i < model.length; i++) {
|
||||
if (model[i]["name"] == plasmoid.configuration.tooltipType) {
|
||||
if (debug) console.info("Found", model[i]["name"], "on", i)
|
||||
tooltipType.currentIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Tooltip width")
|
||||
}
|
||||
QtControls.SpinBox {
|
||||
id: tooltipWidth
|
||||
width: parent.width * 3 / 5
|
||||
minimumValue: 100
|
||||
maximumValue: 1000
|
||||
stepSize: 50
|
||||
value: plasmoid.configuration.tooltipWidth
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Font color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: tooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.tooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.tooltipColor
|
||||
onClicked: colorDialog.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
|
@ -236,6 +236,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 1000
|
||||
|
Reference in New Issue
Block a user