summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Krauter <simon.krauter@dbaudio.com>2019-08-01 13:36:41 +0200
committerSimon Krauter <simon.krauter@dbaudio.com>2019-08-01 13:36:41 +0200
commitefce2e4a1c0488d0824fc4e9e43cb34f2b13f9ce (patch)
tree73d37e891fb343d149e8544467fec2f2694a77e5 /src
parentb4f8c238a55755762c09399c0f2e9da7d4259cda (diff)
downloadNiGui-efce2e4a1c0488d0824fc4e9e43cb34f2b13f9ce.tar.gz
NiGui-efce2e4a1c0488d0824fc4e9e43cb34f2b13f9ce.zip
Apply scaling to fixed values
Diffstat (limited to 'src')
-rwxr-xr-xsrc/nigui.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nigui.nim b/src/nigui.nim
index d5ce698..f142671 100755
--- a/src/nigui.nim
+++ b/src/nigui.nim
@@ -2280,9 +2280,9 @@ method `text=`(button: Button, text: string) =
button.forceRedraw()
# should be extended by NativeButton
-method naturalWidth(button: Button): int = button.getTextWidth(button.text) + 20
+method naturalWidth(button: Button): int = button.getTextWidth(button.text) + 20.scaleToDpi
-method naturalHeight(button: Button): int = button.getTextLineHeight() * button.text.countLines + 12
+method naturalHeight(button: Button): int = button.getTextLineHeight() * button.text.countLines + 12.scaleToDpi
method enabled(button: Button): bool = button.fEnabled