blob: bb02528bcdf22a331817c96ee7f19344b8aa4d7f (
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
38
39
40
41
42
43
44
45
46
47
48
49
 | import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import qs.Services
Item {
  height: parent.height
  width: layout.childrenRect.width
  anchors.verticalCenter: parent.verticalCenter
  readonly property bool active: Boolean(Privacy.activeItems)
  RowLayout {
    id: layout
    anchors.fill: parent
    spacing: 8
    Repeater {
      model: Privacy.activeItems
      Item {
      	id: privacyItem
        required property var modelData;
        height: parent.height
        width: icon.width
	MaterialDesignIcon {
	  id: icon
	  implicitSize: 14
	  anchors.centerIn: parent
	  icon: {
	    if (privacyItem.modelData == Privacy.Item.Microphone)
	     return "microphone";
	    if (privacyItem.modelData == Privacy.Item.Screensharing)
	     return "monitor-share";
	   }
	  color: "#f2201f"
	}
      }
    }
  }
}
 |