blob: 664b28e202d1ca462af74e2b154d15664148802f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import QtQuick
import Quickshell
import Quickshell.Widgets
import qs.Services
Item {
height: parent.height
width: brightnessIcon.width
anchors.verticalCenter: parent.verticalCenter
WrapperMouseArea {
id: widgetMouseArea
anchors.fill: parent
property real sensitivity: (1 / 50) / 120
onWheel: event => Brightness.currBrightness += event.angleDelta.y * sensitivity
Item {
anchors.fill: parent
MaterialDesignIcon {
id: brightnessIcon
implicitSize: 14
anchors.centerIn: parent
icon: `brightness-${Math.min(7, Math.floor(Brightness.currBrightness * 7) + 1)}`
color: "#555"
}
}
}
}
|