Add scaling to everything, edit SidePanel
This commit is contained in:
parent
68d7add474
commit
0b49aff13d
52 changed files with 3138 additions and 3043 deletions
|
|
@ -8,6 +8,23 @@ import qs.Settings
|
|||
Singleton {
|
||||
id: root
|
||||
|
||||
// Design screen width
|
||||
readonly property int designScreenWidth: 1920
|
||||
|
||||
// Scaling dampening factor - reduces the scaling effect for higher resolutions
|
||||
readonly property real scalingDampening: 0.2
|
||||
|
||||
// Automatic scaling based on screen width
|
||||
function screenWidthRatio() {
|
||||
// Get the primary screen width
|
||||
if (Quickshell.screens && Quickshell.screens.length > 0) {
|
||||
var rawRatio = Quickshell.screens[0].width / designScreenWidth
|
||||
// Apply dampening to reduce scaling for higher resolutions
|
||||
return Math.min(2.0, 1.0 + (rawRatio - 1.0) * scalingDampening)
|
||||
}
|
||||
return 1.0
|
||||
}
|
||||
|
||||
function applyOpacity(color, opacity) {
|
||||
return color.replace("#", "#" + opacity);
|
||||
}
|
||||
|
|
@ -100,6 +117,9 @@ Singleton {
|
|||
property color shadow: applyOpacity(themeData.shadow, "B3")
|
||||
property color overlay: applyOpacity(themeData.overlay, "66")
|
||||
|
||||
// Global UI scale factor - automatically calculated based on screen width
|
||||
property real uiScale: screenWidthRatio()
|
||||
|
||||
// Font Properties
|
||||
property string fontFamily: "Roboto" // Family for all text
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue