mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Remove brightness parts totally
This will make it not update the brightness to 0 everytime panel shows up
This commit is contained in:
parent
850af0d46d
commit
69a2673936
1 changed files with 0 additions and 53 deletions
|
|
@ -37,25 +37,6 @@ Item {
|
|||
signal plasmoidTriggered(var id)
|
||||
Layout.minimumHeight: flow.implicitHeight + units.largeSpacing*2
|
||||
|
||||
property int screenBrightness
|
||||
readonly property int maximumScreenBrightness: pmSource.data["PowerDevil"] ? pmSource.data["PowerDevil"]["Maximum Screen Brightness"] || 0 : 0
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: pmSource
|
||||
engine: "powermanagement"
|
||||
connectedSources: ["PowerDevil"]
|
||||
onSourceAdded: {
|
||||
if (source === "PowerDevil") {
|
||||
disconnectSource(source);
|
||||
connectSource(source);
|
||||
}
|
||||
}
|
||||
|
||||
onDataChanged: {
|
||||
root.screenBrightness = pmSource.data["PowerDevil"]["Screen Brightness"];
|
||||
}
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: settingsModel
|
||||
|
||||
|
|
@ -142,39 +123,5 @@ Item {
|
|||
properties: "x,y"
|
||||
}
|
||||
}
|
||||
/*
|
||||
RowLayout {
|
||||
width: flow.width
|
||||
PlasmaCore.IconItem {
|
||||
Layout.preferredWidth: units.iconSizes.small
|
||||
Layout.preferredHeight: Layout.preferredWidth
|
||||
//TODO: needs brightness
|
||||
source: "contrast"
|
||||
}
|
||||
PlasmaComponents.Slider {
|
||||
id: brightnessSlider
|
||||
Layout.fillWidth: true
|
||||
value: root.screenBrightness
|
||||
onValueChanged: {
|
||||
if (pressed) {
|
||||
var service = pmSource.serviceForSource("PowerDevil");
|
||||
var operation = service.operationDescription("setBrightness");
|
||||
operation.brightness = value;
|
||||
operation.silent = true
|
||||
service.startOperationCall(operation);
|
||||
}
|
||||
}
|
||||
minimumValue: maximumValue > 100 ? 1 : 0
|
||||
maximumValue: root.maximumScreenBrightness
|
||||
stepSize: 1
|
||||
}
|
||||
PlasmaCore.IconItem {
|
||||
Layout.preferredWidth: units.iconSizes.small
|
||||
Layout.preferredHeight: Layout.preferredWidth
|
||||
//TODO: needs brightness
|
||||
source: "contrast"
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue