mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Scaling: Replaced all Theme.uiScale by Theme.scale(Screen) so stuff scale accordingly to the Screen used by the Item/component
This commit is contained in:
@@ -21,8 +21,8 @@ Row {
|
||||
Repeater {
|
||||
model: systemTray.items
|
||||
delegate: Item {
|
||||
width: 24 * Theme.uiScale
|
||||
height: 24 * Theme.uiScale
|
||||
width: 24 * Theme.scale(Screen)
|
||||
height: 24 * Theme.scale(Screen)
|
||||
|
||||
visible: modelData
|
||||
property bool isHovered: trayMouseArea.containsMouse
|
||||
@@ -31,17 +31,17 @@ Row {
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: 16 * Theme.uiScale
|
||||
height: 16 * Theme.uiScale
|
||||
radius: 6 * Theme.uiScale
|
||||
width: 16 * Theme.scale(Screen)
|
||||
height: 16 * Theme.scale(Screen)
|
||||
radius: 6 * Theme.scale(Screen)
|
||||
color: "transparent"
|
||||
clip: true
|
||||
|
||||
IconImage {
|
||||
id: trayIcon
|
||||
anchors.centerIn: parent
|
||||
width: 16 * Theme.uiScale
|
||||
height: 16 * Theme.uiScale
|
||||
width: 16 * Theme.scale(Screen)
|
||||
height: 16 * Theme.scale(Screen)
|
||||
smooth: false
|
||||
asynchronous: true
|
||||
backer.fillMode: Image.PreserveAspectFit
|
||||
@@ -99,7 +99,7 @@ Row {
|
||||
if (modelData.hasMenu && modelData.menu && trayMenu) {
|
||||
// Anchor the menu to the tray icon item (parent) and position it below the icon
|
||||
const menuX = (width / 2) - (trayMenu.width / 2);
|
||||
const menuY = height + 20 * Theme.uiScale;
|
||||
const menuY = height + 20 * Theme.scale(Screen);
|
||||
trayMenu.menu = modelData.menu;
|
||||
trayMenu.showAt(parent, menuX, menuY);
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user