From 4c9fb99d3992c4dd485396db9c73508e65663604 Mon Sep 17 00:00:00 2001
From: Nydragon <contact@ccnlc.eu>
Date: Thu, 29 Aug 2024 08:02:09 +0200
Subject: [PATCH] feat: design for privacy widget

NON-FUNCTIONAL
---
 src/Bar.qml                         |  3 +++
 src/widgets/privacy/Privacy.qml     | 25 +++++++++++++++++++++++++
 src/widgets/privacy/PrivacyPill.qml | 13 +++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 src/widgets/privacy/Privacy.qml
 create mode 100644 src/widgets/privacy/PrivacyPill.qml

diff --git a/src/Bar.qml b/src/Bar.qml
index c686e53..0d3f215 100644
--- a/src/Bar.qml
+++ b/src/Bar.qml
@@ -3,6 +3,7 @@ import QtQuick // for Text
 import QtQuick.Layouts
 import "widgets/systray"
 import "widgets/workspaces"
+import "widgets/privacy"
 import "widgets/battery"
 
 Scope {
@@ -41,6 +42,8 @@ Scope {
                 Workspaces {}
 
                 Battery {}
+                Privacy {}
+
                 Item {
                     Layout.fillHeight: true
                 }
diff --git a/src/widgets/privacy/Privacy.qml b/src/widgets/privacy/Privacy.qml
new file mode 100644
index 0000000..6b10d37
--- /dev/null
+++ b/src/widgets/privacy/Privacy.qml
@@ -0,0 +1,25 @@
+import "root:base"
+import QtQuick.Layouts
+
+BRectangle {
+    height: width
+
+    RowLayout {
+        anchors.fill: parent
+        spacing: 1
+        anchors.margins: 3
+
+        PrivacyPill {
+            active: "#FF7F50"
+            inactive: "#b1a4a0"
+        }
+        PrivacyPill {
+            active: "#E0B0fF"
+            inactive: "#dad5dd"
+        }
+        PrivacyPill {
+            active: "#57ffcd"
+            inactive: "#a2b3ae"
+        }
+    }
+}
diff --git a/src/widgets/privacy/PrivacyPill.qml b/src/widgets/privacy/PrivacyPill.qml
new file mode 100644
index 0000000..d07746f
--- /dev/null
+++ b/src/widgets/privacy/PrivacyPill.qml
@@ -0,0 +1,13 @@
+import QtQuick
+import QtQuick.Layouts
+
+Rectangle {
+    property bool isActive: false
+    required property string active
+    required property string inactive
+
+    Layout.fillWidth: true
+    Layout.fillHeight: true
+    color: isActive ? active : inactive
+    radius: 10
+}