Skip to content

Commit 0e336d7

Browse files
committed
qml: remember blockclockdial scale factor
1 parent 2326f41 commit 0e336d7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/qml/components/BlockClock.qml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import QtQuick 2.15
66
import QtQuick.Controls 2.15
77
import QtQuick.Layouts 1.15
8+
import Qt.labs.settings 1.0
89

910
import org.bitcoincore.qt 1.0
1011

@@ -28,10 +29,15 @@ Item {
2829

2930
activeFocusOnTab: true
3031

32+
Settings {
33+
id: settings
34+
property alias blockclocksize: dial.scale
35+
}
36+
3137
BlockClockDial {
3238
id: dial
3339
anchors.horizontalCenter: root.horizontalCenter
34-
width: Math.min((root.parentWidth * (1/3)), (root.parentHeight * (1/3)))
40+
width: Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale))
3541
height: dial.width
3642
penWidth: dial.width / 50
3743
timeRatioList: chainModel.timeRatioList

src/qml/controls/Theme.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
pragma Singleton
22
import QtQuick 2.15
33
import QtQuick.Controls 2.15
4+
import Qt.labs.settings 1.0
45

56
Control {
7+
id: root
68
property bool dark: true
9+
property real blockclocksize: (5/12)
710
readonly property ColorSet color: dark ? darkColorSet : lightColorSet
811
readonly property ImageSet image: dark ? darkImageSet : lightImageSet
912

13+
Settings {
14+
id: settings
15+
property alias blockclocksize: root.blockclocksize
16+
}
17+
1018
component ColorSet: QtObject {
1119
required property color white
1220
required property color background

0 commit comments

Comments
 (0)