v1.6.0: arrow at 90%, euro+arrow bottom-aligned with the price, bitcoin icon at 110%

This commit is contained in:
ArnoldCordewiner
2026-09-05 22:05:08 +02:00
parent e4e848540c
commit 70797782a9
5 changed files with 21 additions and 19 deletions
Binary file not shown.
+8 -7
View File
@@ -193,9 +193,11 @@ Row {
height: 1 height: 1
} }
// euro sign in the plain-text font, white // euro sign in the plain-text font, white; bottom-aligned with the
// price digits (bottomMargin tuned so the glyph bottom matches)
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.bottom: parent.bottom
anchors.bottomMargin: root.height * 0.02
text: "\u20AC" text: "\u20AC"
visible: root.digitsOnly.length > 0 visible: root.digitsOnly.length > 0
color: "#ffffff" color: "#ffffff"
@@ -210,15 +212,14 @@ Row {
} }
// trend arrow: green up / red down; unchanged keeps the last arrow. // trend arrow: green up / red down; unchanged keeps the last arrow.
// The triangle glyph sits low on the baseline; shift it up so its // Bottom-aligned with the euro sign and the digits.
// visual center matches the euro sign.
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.bottom: parent.bottom
anchors.verticalCenterOffset: -root.height * 0.125 anchors.bottomMargin: root.height * 0.16
text: root.lastDir > 0 ? "\u25B2" : "\u25BC" text: root.lastDir > 0 ? "\u25B2" : "\u25BC"
visible: root.digitsOnly.length > 0 && root.lastDir !== 0 visible: root.digitsOnly.length > 0 && root.lastDir !== 0
color: root.lastDir > 0 ? "#2ecc71" : "#e74c3c" color: root.lastDir > 0 ? "#2ecc71" : "#e74c3c"
font.family: Qt.application.font.family font.family: Qt.application.font.family
font.pixelSize: root.height * 1.0 font.pixelSize: root.height * 0.9
} }
} }
+8 -7
View File
@@ -154,9 +154,11 @@ Row {
height: 1 height: 1
} }
// euro sign in the plain-text font, white // euro sign in the plain-text font, white; bottom-aligned with the
// price digits (bottomMargin tuned so the glyph bottom matches)
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.bottom: parent.bottom
anchors.bottomMargin: root.height * -0.015
text: "\u20AC" text: "\u20AC"
visible: root.digits.length > 0 visible: root.digits.length > 0
color: "#ffffff" color: "#ffffff"
@@ -171,16 +173,15 @@ Row {
} }
// trend arrow: green up / red down; unchanged keeps the last arrow. // trend arrow: green up / red down; unchanged keeps the last arrow.
// The triangle glyph sits low on the baseline; shift it up so its // Bottom-aligned with the euro sign and the digits.
// visual center matches the euro sign.
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.bottom: parent.bottom
anchors.verticalCenterOffset: -root.height * 0.095 anchors.bottomMargin: root.height * 0.10
text: root.lastDir > 0 ? "\u25B2" : "\u25BC" text: root.lastDir > 0 ? "\u25B2" : "\u25BC"
visible: root.digits.length > 0 && root.lastDir !== 0 visible: root.digits.length > 0 && root.lastDir !== 0
color: root.lastDir > 0 ? "#2ecc71" : "#e74c3c" color: root.lastDir > 0 ? "#2ecc71" : "#e74c3c"
font.family: Qt.application.font.family font.family: Qt.application.font.family
font.pixelSize: root.height * 0.9 font.pixelSize: root.height * 0.81
} }
// error / empty state // error / empty state
+4 -4
View File
@@ -127,8 +127,8 @@ Item {
Image { Image {
id: btcIcon id: btcIcon
source: "../images/bitcoin.svg" source: "../images/bitcoin.svg"
sourceSize.width: PlasmaCore.Units.iconSizes.smallMedium sourceSize.width: Math.round(PlasmaCore.Units.iconSizes.smallMedium * 1.1)
sourceSize.height: PlasmaCore.Units.iconSizes.smallMedium sourceSize.height: Math.round(PlasmaCore.Units.iconSizes.smallMedium * 1.1)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: root.state === "ok" visible: root.state === "ok"
@@ -174,8 +174,8 @@ Item {
Image { Image {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: "../images/bitcoin.svg" source: "../images/bitcoin.svg"
sourceSize.width: PlasmaCore.Units.iconSizes.large sourceSize.width: Math.round(PlasmaCore.Units.iconSizes.large * 1.1)
sourceSize.height: PlasmaCore.Units.iconSizes.large sourceSize.height: Math.round(PlasmaCore.Units.iconSizes.large * 1.1)
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: root.state === "ok" visible: root.state === "ok"
} }
+1 -1
View File
@@ -10,7 +10,7 @@ X-KDE-ServiceTypes=Plasma/Applet
X-KDE-PluginInfo-Author=Arnold Cordewiner X-KDE-PluginInfo-Author=Arnold Cordewiner
X-KDE-PluginInfo-Email=hermes@a14r.be X-KDE-PluginInfo-Email=hermes@a14r.be
X-KDE-PluginInfo-Name=nl.a14r.bitcoinprice X-KDE-PluginInfo-Name=nl.a14r.bitcoinprice
X-KDE-PluginInfo-Version=1.5.2 X-KDE-PluginInfo-Version=1.6.0
X-KDE-PluginInfo-Website=https://gitea.a14r.be/hermes/plasma-bitcoin-price X-KDE-PluginInfo-Website=https://gitea.a14r.be/hermes/plasma-bitcoin-price
X-KDE-PluginInfo-Category=Utilities X-KDE-PluginInfo-Category=Utilities
X-KDE-PluginInfo-License=MIT X-KDE-PluginInfo-License=MIT