Skip to content

Commit 533a9fc

Browse files
committed
Merge #385: Fix For BlockClock Min Size
d6331aa qml: fix the BlockClock's minimum size (D33r-Gee) Pull request description: Issue and Fix: This fixes #382 [GBKS](https://github.com/GBKS) reported an issue where the blockclock on their Galaxy A32 5G phone displayed incorrectly under the min size of 200 pixels. They provided a fix implemented in this pull request: `Math.max(Math.min(200, root.parentWidth - 30), Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale)))` Verification: I tested the fix on both a virtual device Galaxy A32 5G in Android Studio and a physical Galaxy A13 5G (armv7) device. The fix successfully resolves the pixel-related display issue on both devices. ACKs for top commit: johnny9: ACK d6331aa pablomartin4btc: tACK d6331aa Tree-SHA512: 38604cf69cf370daeb09d29b6bdebf03f45f497b60cde5b43e1d806cd2211da8d6c47bbf6fa9ba897591e62104cad3cc699e580a6d8c65b02df16bedd7507e17
2 parents 67150ef + d6331aa commit 533a9fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/qml/components/BlockClock.qml

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Item {
4242
id: dial
4343
anchors.horizontalCenter: root.horizontalCenter
4444
scale: Theme.blockclocksize
45-
width: Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale))
45+
width: {Math.max(Math.min(200, Math.min(root.parentWidth - 30, root.parentHeight - 30)),
46+
Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale)))}
4647
height: dial.width
4748
penWidth: dial.width / 50
4849
timeRatioList: chainModel.timeRatioList

0 commit comments

Comments
 (0)