blob: d3330cdefbe2965cf69d3291d8eff8ab8367d912 (
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
34
35
36
37
|
import QtQuick
import qs.Common
import qs.Modules.Plugins
import qs.Widgets
BasePill {
id: root
property bool isActive: false
signal colorPickerRequested
content: Component {
Item {
implicitWidth: icon.width
implicitHeight: root.widgetThickness - root.horizontalPadding * 2
DankIcon {
id: icon
anchors.centerIn: parent
name: "palette"
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
color: root.isActive ? Theme.primary : Theme.surfaceText
}
}
}
MouseArea {
z: 1
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onPressed: mouse => {
root.triggerRipple(this, mouse.x, mouse.y);
root.colorPickerRequested();
}
}
}
|