Normalize bar icon size and alignment
This commit is contained in:
17 files changed
+540
-116
No files matched your search
@@ -7,11 +7,13 @@ Item {
|
||||
id: root
|
||||
|
||||
property real iconSize: Style.font.icon
|
||||
readonly property real aspectRatio: 1.18
|
||||
property real artworkScale: 0.95
|
||||
property color color: Commons.Color.foreground
|
||||
|
||||
width: iconSize * 1.18
|
||||
width: iconSize * aspectRatio
|
||||
height: iconSize
|
||||
implicitWidth: iconSize * 1.18
|
||||
implicitWidth: iconSize * aspectRatio
|
||||
implicitHeight: iconSize
|
||||
|
||||
Shape {
|
||||
@@ -19,7 +21,7 @@ Item {
|
||||
antialiasing: true
|
||||
layer.enabled: true
|
||||
layer.samples: 4
|
||||
scale: 0.95
|
||||
scale: root.artworkScale
|
||||
|
||||
Tile { cx: root.width * 0.25; cy: root.height * 0.188 }
|
||||
Tile { cx: root.width * 0.75; cy: root.height * 0.188 }
|
||||
|
||||
@@ -175,8 +175,10 @@ Panel {
|
||||
iconComponent: Component {
|
||||
Item {
|
||||
DropboxIcon {
|
||||
anchors.centerIn: parent
|
||||
iconSize: Style.space(12)
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
iconSize: button.iconSize / aspectRatio
|
||||
artworkScale: 1
|
||||
color: root.barIconColor
|
||||
opacity: dropbox.active ? 1.0 : 0.6
|
||||
}
|
||||
|
||||
@@ -278,9 +278,8 @@ Panel {
|
||||
id: button
|
||||
anchors.fill: parent
|
||||
bar: root.bar
|
||||
text: root.showPercentage && !vertical
|
||||
? Math.round(root.batteryFraction * 100) + "% " + root.batteryIcon()
|
||||
: root.batteryIcon()
|
||||
text: root.batteryIcon()
|
||||
labelText: root.showPercentage && !vertical ? Math.round(root.batteryFraction * 100) + "%" : ""
|
||||
slotSize: Style.bar.iconSlot * (root.showPercentage && !vertical ? 2 : 1)
|
||||
tooltipText: ""
|
||||
onPressed: function(b) {
|
||||
|
||||
@@ -385,8 +385,9 @@ Panel {
|
||||
iconComponent: Component {
|
||||
Item {
|
||||
TailscaleIcon {
|
||||
anchors.centerIn: parent
|
||||
iconSize: Style.space(11)
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
iconSize: button.iconSize
|
||||
color: root.barIconColor
|
||||
badgeColor: root.urgent
|
||||
crossed: !tailscale.active && !tailscale.needsLogin
|
||||
|
||||
Reference in new issue
Block a user