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:
parent
3148dc62a0
commit
cb74b6e5d5
50 changed files with 564 additions and 568 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue