v1.2.0: add split-flap board and nixie tube display modes with display style config
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Plain text display mode — colored price text.
|
||||
* Pure QtQuick on purpose: no Plasma imports, so it can be loaded
|
||||
* and tested outside the plasmoid shell.
|
||||
*/
|
||||
|
||||
import QtQuick 2.15
|
||||
|
||||
Text {
|
||||
id: root
|
||||
|
||||
// wired by the parent loader: the formatted price string
|
||||
property string display: "--"
|
||||
// trend color (green/red/grey) from the widget root
|
||||
property color trendColor: "#9e9e9e"
|
||||
|
||||
text: root.display
|
||||
color: root.trendColor
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: Qt.application.font.family
|
||||
font.pixelSize: root.height > 0
|
||||
? Math.round(root.height * 0.82)
|
||||
: Qt.application.font.pixelSize
|
||||
}
|
||||
Reference in New Issue
Block a user