From efce2e4a1c0488d0824fc4e9e43cb34f2b13f9ce Mon Sep 17 00:00:00 2001 From: Simon Krauter Date: Thu, 1 Aug 2019 13:36:41 +0200 Subject: Apply scaling to fixed values --- src/nigui.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3