Compare commits
No commits in common. "58c37a9dce6edfe590c9a7aafe750458bf24cc61" and "ed47f2a5429925361bb0273d008babb55ff2b6ad" have entirely different histories.
58c37a9dce
...
ed47f2a542
|
@ -15,12 +15,6 @@ kpackagetool5 -t Plasma/Applet --install ./package
|
||||||
## Uninstall
|
## Uninstall
|
||||||
|
|
||||||
```
|
```
|
||||||
|
cd headsetcontrol-battery-widget
|
||||||
kpackagetool5 -t Plasma/Applet --remove org.kde.plasma.headsetcontrol-battery-widget
|
kpackagetool5 -t Plasma/Applet --remove org.kde.plasma.headsetcontrol-battery-widget
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
```
|
|
||||||
cd headsetcontrol-battery-widget
|
|
||||||
kpackagetool5 -t Plasma/Applet --upgrade ./package ; systemctl --user restart plasma-plasmashell
|
|
||||||
```
|
|
||||||
|
|
|
@ -11,10 +11,5 @@
|
||||||
<min>2.0</min>
|
<min>2.0</min>
|
||||||
<max>60.0</max>
|
<max>60.0</max>
|
||||||
</entry>
|
</entry>
|
||||||
<entry name="batteryheight" type="Int">
|
|
||||||
<default>8.0</default>
|
|
||||||
<min>1.0</min>
|
|
||||||
<max>10.0</max>
|
|
||||||
</entry>
|
|
||||||
</group>
|
</group>
|
||||||
</kcfg>
|
</kcfg>
|
||||||
|
|
|
@ -8,7 +8,6 @@ QQC2.Pane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias cfg_pollingrate: pollingrate.value
|
property alias cfg_pollingrate: pollingrate.value
|
||||||
property alias cfg_batteryheight: batteryheight.value
|
|
||||||
|
|
||||||
Kirigami.FormLayout {
|
Kirigami.FormLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -16,14 +15,12 @@ QQC2.Pane {
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 3
|
columns: 3
|
||||||
rows: 2
|
|
||||||
rowSpacing: 10
|
|
||||||
|
|
||||||
// first row
|
|
||||||
Text {
|
Text {
|
||||||
text: "polling rate:"
|
text: "polling rate:"
|
||||||
color: PlasmaCore.Theme.textColor
|
color: PlasmaCore.Theme.textColor
|
||||||
}
|
}
|
||||||
|
|
||||||
QQC2.Slider {
|
QQC2.Slider {
|
||||||
id: pollingrate
|
id: pollingrate
|
||||||
value: 10.0
|
value: 10.0
|
||||||
|
@ -31,37 +28,17 @@ QQC2.Pane {
|
||||||
to: 60.0
|
to: 60.0
|
||||||
stepSize: 2.0
|
stepSize: 2.0
|
||||||
snapMode: QQC2.Slider.SnapAlways
|
snapMode: QQC2.Slider.SnapAlways
|
||||||
|
Kirigami.FormData.label: i18nc("@label", "polling rate in seconds:")
|
||||||
onMoved: {
|
onMoved: {
|
||||||
pollingratevalue.text = this.value + " seconds";
|
pollingratevalue.text = this.value + " seconds";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: pollingratevalue
|
id: pollingratevalue
|
||||||
text: pollingrate.value + " seconds"
|
text: pollingrate.value + " seconds"
|
||||||
color: PlasmaCore.Theme.textColor
|
color: PlasmaCore.Theme.textColor
|
||||||
}
|
}
|
||||||
|
|
||||||
// second row
|
|
||||||
Text {
|
|
||||||
text: "battery height:"
|
|
||||||
color: PlasmaCore.Theme.textColor
|
|
||||||
}
|
|
||||||
QQC2.Slider {
|
|
||||||
id: batteryheight
|
|
||||||
value: 8.0
|
|
||||||
from: 1.0
|
|
||||||
to: 10.0
|
|
||||||
stepSize: 1.0
|
|
||||||
snapMode: QQC2.Slider.SnapAlways
|
|
||||||
onMoved: {
|
|
||||||
batteryheightvalue.text = this.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Text { // dummy
|
|
||||||
id: batteryheightvalue
|
|
||||||
text: batteryheight.value
|
|
||||||
color: PlasmaCore.Theme.textColor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ Item {
|
||||||
id: main
|
id: main
|
||||||
|
|
||||||
property int pollingrate: Plasmoid.configuration.pollingrate
|
property int pollingrate: Plasmoid.configuration.pollingrate
|
||||||
property int batteryheight: Plasmoid.configuration.batteryheight
|
|
||||||
property int batteryPercent: -2
|
property int batteryPercent: -2
|
||||||
|
|
||||||
PlasmaCore.DataSource {
|
PlasmaCore.DataSource {
|
||||||
|
@ -35,8 +34,8 @@ Item {
|
||||||
id: container
|
id: container
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: 2
|
anchors.rightMargin: 2
|
||||||
anchors.topMargin: 10 - batteryheight
|
anchors.topMargin: 2
|
||||||
anchors.bottomMargin: 10 - batteryheight
|
anchors.bottomMargin: 2
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.color: PlasmaCore.Theme.textColor
|
border.color: PlasmaCore.Theme.textColor
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user