diff --git a/qml.qrc b/qml.qrc
index a192518..61c8169 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -103,5 +103,6 @@
qml/IconButton.qml
images/dark/down.svg
images/light/down.svg
+ qml/SystemTray.qml
diff --git a/qml/CardItem.qml b/qml/CardItem.qml
index 196b537..f02f615 100644
--- a/qml/CardItem.qml
+++ b/qml/CardItem.qml
@@ -100,6 +100,8 @@ Item {
asynchronous: true
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: FishUI.Units.largeSpacing
+ antialiasing: true
+ smooth: true
// ColorOverlay {
// anchors.fill: _image
diff --git a/qml/ControlCenter.qml b/qml/ControlCenter.qml
index 175245e..074f831 100644
--- a/qml/ControlCenter.qml
+++ b/qml/ControlCenter.qml
@@ -140,6 +140,8 @@ ControlCenterDialog {
Layout.preferredWidth: iconSize
sourceSize: String(source) === "image://icontheme/default-user" ? Qt.size(iconSize, iconSize) : undefined
source: currentUser.iconFileName ? "file:///" + currentUser.iconFileName : "image://icontheme/default-user"
+ antialiasing: true
+ smooth: false
layer.enabled: true
layer.effect: OpacityMask {
@@ -380,6 +382,8 @@ ControlCenterDialog {
source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark/" : "light/") + battery.iconSource
asynchronous: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ antialiasing: true
+ smooth: false
}
Label {
diff --git a/qml/IconButton.qml b/qml/IconButton.qml
index c93178f..1ba185d 100644
--- a/qml/IconButton.qml
+++ b/qml/IconButton.qml
@@ -72,5 +72,7 @@ Item {
sourceSize.height: height
source: control.source
asynchronous: true
+ antialiasing: true
+ smooth: false
}
}
diff --git a/qml/SystemTray.qml b/qml/SystemTray.qml
new file mode 100644
index 0000000..7565870
--- /dev/null
+++ b/qml/SystemTray.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.12
+import QtQuick.Layouts 1.12
+import QtQuick.Controls 2.12
+
+import Cutefish.StatusBar 1.0
+import FishUI 1.0 as FishUI
+
+ListView {
+ id: trayView
+
+ orientation: Qt.Horizontal
+ layoutDirection: Qt.RightToLeft
+ interactive: false
+ spacing: FishUI.Units.smallSpacing / 2
+ clip: true
+
+ property real itemWidth: rootItem.iconSize + FishUI.Units.largeSpacing
+
+ Layout.fillHeight: true
+ Layout.preferredWidth: (itemWidth + (count - 1) * FishUI.Units.smallSpacing) * count
+
+ model: SystemTrayModel {
+ id: trayModel
+ }
+
+ delegate: StandardItem {
+ property bool darkMode: rootItem.darkMode
+
+ width: trayView.itemWidth
+ height: ListView.view.height
+ animationEnabled: true
+
+ onDarkModeChanged: updateTimer.restart()
+
+ Timer {
+ id: updateTimer
+ interval: 10
+ onTriggered: iconItem.updateIcon()
+ }
+
+ FishUI.IconItem {
+ id: iconItem
+ anchors.centerIn: parent
+ width: rootItem.iconSize
+ height: width
+ source: model.iconName ? model.iconName : model.icon
+ antialiasing: true
+ smooth: false
+ }
+
+ onClicked: trayModel.leftButtonClick(model.id)
+ onRightClicked: trayModel.rightButtonClick(model.id)
+ popupText: model.toolTip ? model.toolTip : model.title
+ }
+}
diff --git a/qml/main.qml b/qml/main.qml
index c743c07..da4acb5 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -102,6 +102,8 @@ Item {
rootItem.iconSize)
source: acticity.icon ? "image://icontheme/" + acticity.icon : ""
visible: status === Image.Ready
+ antialiasing: true
+ smooth: false
}
Label {
@@ -251,6 +253,8 @@ Item {
width: rootItem.iconSize
height: width
source: model.iconName ? model.iconName : model.icon
+ antialiasing: true
+ smooth: false
}
onClicked: trayModel.leftButtonClick(model.id)
@@ -270,6 +274,12 @@ Item {
onClicked: toggleDialog()
onRightClicked: toggleDialog()
+ Behavior on Layout.preferredWidth {
+ NumberAnimation {
+ duration: 100
+ }
+ }
+
function toggleDialog() {
if (controlCenter.visible)
controlCenter.close()
@@ -298,6 +308,8 @@ Item {
sourceSize: Qt.size(width, height)
asynchronous: true
Layout.alignment: Qt.AlignCenter
+ antialiasing: true
+ smooth: false
}
Image {
@@ -312,6 +324,8 @@ Item {
enabledConnections.wirelessEnabled &&
activeConnection.wirelessName &&
wirelessIcon.status === Image.Ready
+ antialiasing: true
+ smooth: false
}
// Battery Item
@@ -325,6 +339,8 @@ Item {
sourceSize: Qt.size(width, height)
source: "qrc:/images/" + (rootItem.darkMode ? "dark/" : "light/") + battery.iconSource
Layout.alignment: Qt.AlignCenter
+ antialiasing: true
+ smooth: false
}
Label {