mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Scaling: many improvements and fixes
- radius are not pixels, they should not be scaled - use "screen" instead of "Screen" which helps a lot in some places
This commit is contained in:
+7
-7
@@ -17,8 +17,8 @@ Item {
|
||||
model: root.tabsModel
|
||||
delegate: Rectangle {
|
||||
id: tabWrapper
|
||||
implicitHeight: tab.height * Theme.scale(Screen)
|
||||
implicitWidth: 56 * Theme.scale(Screen)
|
||||
implicitHeight: tab.height * Theme.scale(screen)
|
||||
implicitWidth: 56 * Theme.scale(screen)
|
||||
color: "transparent"
|
||||
|
||||
property bool hovered: false
|
||||
@@ -48,7 +48,7 @@ Item {
|
||||
Text {
|
||||
text: modelData.icon
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 22 * Theme.scale(Screen)
|
||||
font.pixelSize: 22 * Theme.scale(screen)
|
||||
color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : tabWrapper.hovered ? (Theme ? Theme.accentPrimary : "#7C3AED") : (Theme ? Theme.textSecondary : "#444")
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
@@ -56,7 +56,7 @@ Item {
|
||||
// Label
|
||||
Text {
|
||||
text: modelData.label
|
||||
font.pixelSize: 12 * Theme.scale(Screen)
|
||||
font.pixelSize: 12 * Theme.scale(screen)
|
||||
font.bold: index === root.currentIndex
|
||||
color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : tabWrapper.hovered ? (Theme ? Theme.accentPrimary : "#7C3AED") : (Theme ? Theme.textSecondary : "#444")
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
@@ -64,9 +64,9 @@ Item {
|
||||
|
||||
// Underline for active tab
|
||||
Rectangle {
|
||||
width: 24 * Theme.scale(Screen)
|
||||
height: 2 * Theme.scale(Screen)
|
||||
radius: 1 * Theme.scale(Screen)
|
||||
width: 24 * Theme.scale(screen)
|
||||
height: 2 * Theme.scale(screen)
|
||||
radius: 1
|
||||
color: index === root.currentIndex ? (Theme ? Theme.accentPrimary : "#7C3AED") : "transparent"
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user