summaryrefslogtreecommitdiff
path: root/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml
diff options
context:
space:
mode:
authorgabeszm <vgabor92@protonmail.com>2026-09-13 10:48:36 +0200
committergabeszm <vgabor92@protonmail.com>2026-09-13 10:48:36 +0200
commitb132f616fc27a62ad9612ec42a19b027e72a52b7 (patch)
treebf4d29f6c4246d560fb3cd97aba059f638191ed5 /raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml
parenta65fb557cfce85e27448139e9c0317c36b7d06cb (diff)
downloadRaveOS-PKGBUILD-b132f616fc27a62ad9612ec42a19b027e72a52b7.tar.gz
RaveOS-PKGBUILD-b132f616fc27a62ad9612ec42a19b027e72a52b7.zip
fix responsive ui
Diffstat (limited to 'raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml')
-rw-r--r--raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml47
1 files changed, 29 insertions, 18 deletions
diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml b/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml
index 301256b..ed614b6 100644
--- a/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml
+++ b/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml
@@ -9,8 +9,8 @@ import QtQuick.Controls 2.15
Item {
id: sessionButton
- height: root.font.pointSize * 2
- width: parent.width / 2
+ height: root.font.pointSize * 1.8
+ width: parent.width
property var selectedSession: selectSession.currentIndex
property string textConstantSession
@@ -22,7 +22,7 @@ Item {
// important
// change also in errorMessage
- height: root.font.pointSize * 2
+ height: root.font.pointSize * 1.8
anchors.horizontalCenter: parent.horizontalCenter
hoverEnabled: true
@@ -38,7 +38,7 @@ Item {
delegate: ItemDelegate {
// minus padding
- width: popupHandler.width - 20
+ width: popupHandler.width - root.font.pointSize * 1.5
anchors.horizontalCenter: popupHandler.horizontalCenter
contentItem: Text {
@@ -53,7 +53,7 @@ Item {
background: Rectangle {
color: selectSession.highlightedIndex === index ? Qt.rgba(1, 1, 1, 0.15) : "transparent"
- radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : 5
+ radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : root.font.pointSize * 0.4
}
}
@@ -71,21 +71,32 @@ Item {
text: (config.TranslateSessionSelection || "Session") + ": " + selectSession.currentText
color: config.SessionButtonTextColor
+ style: Text.Raised
+ styleColor: Qt.rgba(0, 0, 0, 0.40)
font.pointSize: root.font.pointSize * 0.8
font.family: root.font.family
Keys.onReleased: parent.popup.open()
}
- background: Rectangle {
- anchors.fill: parent
- radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 10
- color: selectSession.down ? Qt.rgba(1, 1, 1, 0.12) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.08) : Qt.rgba(1, 1, 1, 0.04))
- border.color: selectSession.visualFocus ? Qt.rgba(1, 1, 1, 0.60) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.18))
- border.width: selectSession.visualFocus ? 1.5 : 1
+ background: Item {
+ Rectangle {
+ anchors.fill: parent
+ anchors.topMargin: root.font.pointSize * 0.10
+ radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8
+ color: Qt.rgba(0, 0, 0, 0.20)
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8
+ color: selectSession.down ? Qt.rgba(1, 1, 1, 0.20) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.14) : Qt.rgba(1, 1, 1, 0.08))
+ border.color: selectSession.visualFocus ? Qt.rgba(1, 1, 1, 0.70) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.40) : Qt.rgba(1, 1, 1, 0.22))
+ border.width: selectSession.visualFocus ? root.font.pointSize * 0.12 : root.font.pointSize * 0.08
- Behavior on color { ColorAnimation { duration: 150 } }
- Behavior on border.color { ColorAnimation { duration: 150 } }
+ Behavior on color { ColorAnimation { duration: 150 } }
+ Behavior on border.color { ColorAnimation { duration: 150 } }
+ }
}
popup: Popup {
@@ -93,12 +104,12 @@ Item {
implicitHeight: contentItem.implicitHeight
width: sessionButton.width
- y: parent.height - 1
+ y: parent.height - root.font.pointSize * 0.08
x: -popupHandler.width/2 + displayedItem.width/2
- padding: 10
+ padding: root.font.pointSize * 0.8
contentItem: ListView {
- implicitHeight: contentHeight + 20
+ implicitHeight: contentHeight + root.font.pointSize * 1.5
clip: true
model: selectSession.popup.visible ? selectSession.delegateModel : null
@@ -107,10 +118,10 @@ Item {
}
background: Rectangle {
- radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : 10
+ radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : root.font.pointSize * 0.8
color: config.BackgroundColor
border.color: Qt.rgba(1, 1, 1, 0.20)
- border.width: 1
+ border.width: root.font.pointSize * 0.08
}
enter: Transition {