View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032260 | Lazarus | LCL | public | 2017-08-11 13:43 | 2017-08-14 12:22 |
Reporter | Petr-K | Assigned To | Ondrej Pokorny | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | ||||
Product Version | 1.9 (SVN) | ||||
Summary | 0032260: Font in HintWindow on Hi DPI is too small | ||||
Description | In THintWindow.Create inherited TCustomDesignControl.Create sets Font.PixelsPerInch to 96 then Assignment Font := Screen.HintFont scales Font Height. IMHO THintWindow is not designed then Font.PixelsPerInch should be same as Screen.PixelsPerInch Patch is included. | ||||
Steps To Reproduce | Windows with big fonts set 150% (144 DPI). Screen.HintFont.Size := 7; Displayed hint font is smaler than set in Screen.HintFont. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 55659 | ||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
|
hintwindow.patch (510 bytes)
Index: lcl/include/hintwindow.inc =================================================================== --- lcl/include/hintwindow.inc (revision 55345) +++ lcl/include/hintwindow.inc (working copy) @@ -32,6 +32,7 @@ fCompStyle := csHintWindow; Parent := nil; Color := clInfoBk; + Font.PixelsPerInch := Screen.PixelsPerInch; //TCustomDesignControl.Create sets 96, Screen.HintFont is then scaled down on HiDPI Font := Screen.HintFont; Canvas.Brush.Style := bsClear; FAlignment := taLeftJustify; |
|
Unfortunately it's not that easy - you have to take in mind that there can be different PPIs on different monitors. I'll take a look. |
|
It works fine for me. Please upload a sample application to reproduce the problem. |
|
|
|
Hintapp.zip uploaded. Run project1.exe - Form Hint is smaller then Label1.Caption. I use Windows 8 with big fonts set 150% (144 DPI). If you place breakpoint on constructor THintWindow.Create Font := Screen.HintFont; Font has 96DPI, Screen.HintFont has 144DPI and assignment scales font Height. |
|
You haven't set Application.Scaled := True. See http://wiki.lazarus.freepascal.org/High_DPI chapter "High DPI in Lazarus 1.8 and above". |
|
No, you were right. The hint font has to be scaled also for Application.Scaled=False. Fixed. |
|
In my app I scale everything myself. I missed this setting. Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-08-11 13:43 | Petr-K | New Issue | |
2017-08-11 13:43 | Petr-K | File Added: hintwindow.patch | |
2017-08-11 22:15 | Ondrej Pokorny | Assigned To | => Ondrej Pokorny |
2017-08-11 22:15 | Ondrej Pokorny | Status | new => assigned |
2017-08-11 22:15 | Ondrej Pokorny | Note Added: 0102139 | |
2017-08-12 14:06 | Ondrej Pokorny | LazTarget | => - |
2017-08-12 14:06 | Ondrej Pokorny | Note Added: 0102143 | |
2017-08-12 14:06 | Ondrej Pokorny | Status | assigned => feedback |
2017-08-14 09:24 | Petr-K | File Added: hintapp.zip | |
2017-08-14 09:39 | Petr-K | Note Added: 0102161 | |
2017-08-14 09:39 | Petr-K | Status | feedback => assigned |
2017-08-14 11:33 | Ondrej Pokorny | Note Added: 0102162 | |
2017-08-14 11:33 | Ondrej Pokorny | Status | assigned => resolved |
2017-08-14 11:33 | Ondrej Pokorny | Resolution | open => no change required |
2017-08-14 12:21 | Ondrej Pokorny | Fixed in Revision | => 55659 |
2017-08-14 12:21 | Ondrej Pokorny | Note Added: 0102163 | |
2017-08-14 12:21 | Ondrej Pokorny | Resolution | no change required => fixed |
2017-08-14 12:22 | Petr-K | Note Added: 0102164 | |
2017-08-14 12:22 | Petr-K | Status | resolved => closed |