Implement UI zooming

This commit is contained in:
miruka
2019-12-04 09:08:38 -04:00
parent 87a81ed1a7
commit 34e0ec7c7d
18 changed files with 61 additions and 31 deletions

View File

@@ -3,7 +3,7 @@ import RadialBar 1.0
RadialBar {
id: bar
implicitWidth: 96
implicitWidth: 96 * (theme ? theme.uiScale : 1)
implicitHeight: implicitWidth
foregroundColor: theme.controls.circleProgressBar.background
progressColor: theme.controls.circleProgressBar.foreground

View File

@@ -14,7 +14,13 @@ Image {
property string svgName: ""
property int dimension: 20
property bool small: false
property int dimension:
theme ?
(small ? theme.icons.smallDimension : theme.icons.dimension) :
(small ? 16 : 22)
property color colorize: theme.icons.colorize
property string iconPack: theme ? theme.icons.preferredPack : "thin"

View File

@@ -80,7 +80,6 @@ Image {
anchors.centerIn: parent
visible: broken || image.status === Image.Error
svgName: "broken-image"
dimension: Math.max(16, Math.min(parent.width, parent.height) * 0.2)
colorize: theme.colors.negativeBackground
}
}

View File

@@ -55,7 +55,8 @@ HButton {
visible: Layout.maximumWidth > 0
Layout.maximumWidth:
text && tile.width >= 160 ? implicitWidth : 0
text && tile.width >= 160 * theme.uiScale ?
implicitWidth : 0
Behavior on Layout.maximumWidth { HNumberAnimation {} }
}

View File

@@ -21,7 +21,7 @@ HAvatar {
z: 100
sourceComponent: HIcon {
dimension: 16
small: true
svgName: "user-power-" + (admin ? "100" : "50")
colorize: admin ?
theme.chat.roomSidePane.member.adminIcon :

View File

@@ -4,5 +4,5 @@ import "../../Base"
HButton {
backgroundColor: "transparent"
iconItem.dimension: theme.mediaPlayer.controls.iconHeight
iconItem.dimension: theme.mediaPlayer.controls.iconSize
}