Skip to content

Commit

Permalink
Merge #385: Fix For BlockClock Min Size
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hebasto committed Jan 1, 2024
2 parents 67150ef + d6331aa commit 533a9fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qml/components/BlockClock.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Item {
id: dial
anchors.horizontalCenter: root.horizontalCenter
scale: Theme.blockclocksize
width: Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale))
width: {Math.max(Math.min(200, Math.min(root.parentWidth - 30, root.parentHeight - 30)),
Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale)))}
height: dial.width
penWidth: dial.width / 50
timeRatioList: chainModel.timeRatioList
Expand Down

0 comments on commit 533a9fc

Please sign in to comment.