summaryrefslogtreecommitdiff
path: root/modules/controlcenter
diff options
context:
space:
mode:
authorATMDA <atdma2600@gmail.com>2025-11-11 16:22:14 -0500
committerATMDA <atdma2600@gmail.com>2025-11-11 16:22:14 -0500
commitcb6eaaa25a61b0e14a3d2f120e4cbfef6551a1d0 (patch)
tree26cf59fbcd8748b97694fb2bdbbdcc5e3c840986 /modules/controlcenter
parentcontrolcenter: added connection information to wireless to match ethernet panel (diff)
downloadcaelestia-shell-cb6eaaa25a61b0e14a3d2f120e4cbfef6551a1d0.tar.gz
caelestia-shell-cb6eaaa25a61b0e14a3d2f120e4cbfef6551a1d0.tar.bz2
caelestia-shell-cb6eaaa25a61b0e14a3d2f120e4cbfef6551a1d0.zip
controlcenter: desktop selector in appearance panel font styling
Diffstat (limited to 'modules/controlcenter')
-rw-r--r--modules/controlcenter/appearance/AppearancePane.qml70
1 files changed, 65 insertions, 5 deletions
diff --git a/modules/controlcenter/appearance/AppearancePane.qml b/modules/controlcenter/appearance/AppearancePane.qml
index d50eb58..e3600ed 100644
--- a/modules/controlcenter/appearance/AppearancePane.qml
+++ b/modules/controlcenter/appearance/AppearancePane.qml
@@ -2045,16 +2045,76 @@ RowLayout {
}
}
+ // Gradient overlay for filename with rounded bottom corners
+ Rectangle {
+ id: filenameOverlay
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ height: filenameText.implicitHeight + Appearance.padding.normal * 2
+
+ // Match the parent's rounded corners at the bottom
+ radius: Appearance.rounding.normal
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.rgba(0, 0, 0, 0) }
+ GradientStop { position: 0.3; color: Qt.rgba(0, 0, 0, 0.3) }
+ GradientStop { position: 0.7; color: Qt.rgba(0, 0, 0, 0.75) }
+ GradientStop { position: 1.0; color: Qt.rgba(0, 0, 0, 0.85) }
+ }
+
+ opacity: 0
+
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 200
+ easing.type: Easing.OutCubic
+ }
+ }
+
+ Component.onCompleted: {
+ opacity = 1;
+ }
+ }
+
StyledText {
+ id: filenameText
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
- anchors.margins: Appearance.padding.small
+ anchors.leftMargin: Appearance.padding.normal
+ anchors.rightMargin: Appearance.padding.normal
+ anchors.bottomMargin: Appearance.padding.normal
- text: modelData.relativePath
- font.pointSize: Appearance.font.size.small
- color: isCurrent ? Colours.palette.m3primary : Colours.palette.m3onSurface
- elide: Text.ElideRight
+ readonly property string fileName: {
+ const path = modelData.relativePath || "";
+ const parts = path.split("/");
+ return parts.length > 0 ? parts[parts.length - 1] : path;
+ }
+
+ text: fileName
+ font.pointSize: Appearance.font.size.smaller
+ font.weight: 500
+ color: isCurrent ? Colours.palette.m3primary : "#FFFFFF"
+ elide: Text.ElideMiddle
+ maximumLineCount: 1
+
+ // Text shadow for better readability
+ style: Text.Outline
+ styleColor: Qt.rgba(0, 0, 0, 0.6)
+
+ opacity: 0
+
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 200
+ easing.type: Easing.OutCubic
+ }
+ }
+
+ Component.onCompleted: {
+ opacity = 1;
+ }
}
}
}