View Issue Details

IDProjectCategoryView StatusLast Update
0031785LazarusIDEpublic2017-08-12 22:09
ReportertheoAssigned ToMichl 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformOSOpenSUSE OS VersionLeap 42.2
Product Version1.9 (SVN)Product Build54844 
Target VersionFixed in Version 
Summary0031785: GTK2 size calculations of dialogs initially wrong using theme oxygen-gtk
DescriptionLazarus 1.9.0 r54844M FPC 3.0.2 x86_64-linux-gtk2
gtk2-devel 2.24.31-12.1

Please see attached example lazgtkw.png.
After resizing dialogs (even make them smaller), sizes will be correct.
See lazgtkr.png.

The problem is visible with oxygen-gtk theme.
TagsNo tags attached.
Fixed in Revisionr55396
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0031199 closedMichl High-DPI Ubuntu screens not detected 
related to 0031496 resolvedJuha Manninen (regression) ButtonPanel: after reopen form, panel's height smaller 
related to 0032059 resolvedMartin Friebe IDE Source editor cannot scroll to last line 

Activities

theo

2017-05-09 13:08

reporter  

lazgtkw.png (90,220 bytes)
lazgtkw.png (90,220 bytes)

theo

2017-05-09 13:09

reporter  

lazgtkr.png (85,332 bytes)
lazgtkr.png (85,332 bytes)

Michl

2017-06-07 13:18

developer   ~0100929

Last edited: 2017-06-07 13:22

View 2 revisions

I can confirm this issue on Linux Mint 17.3

The problem is, that Lazarus don't take the font DPI setting from system options. I can change this setting to 144, 192 or whatever, Lazarus still shows 96DPI for DesignTimePPI.

See at the added snapshop, how Lazarus look at a 192 DPI font.

Michl

2017-06-07 13:18

developer  

Snapshot.png (215,906 bytes)
Snapshot.png (215,906 bytes)

Anton Kavalenka

2017-06-07 16:20

reporter   ~0100932

Last edited: 2017-06-07 17:48

View 2 revisions

See also 0031199
There is no way to detect scaling factor. Display always reports it is 96 dpi. GTK reports integer scaling factor. Recent GTK can report floating point scale factor.

May propose dirty hack - calculate scaling (virtual DPI) from default desktop font size.

Michl

2017-06-09 00:02

developer   ~0100955

> May propose dirty hack - calculate scaling (virtual DPI) from default desktop font size

Not the best solution but maybe better then nothing?

https://stackoverflow.com/questions/25048987/in-gtk-linux-whats-the-correct-way-to-get-the-dpi-scale-factor sounds not good.

theo

2017-08-12 22:09

reporter   ~0102149

Thanks

Issue History

Date Modified Username Field Change
2017-05-09 13:08 theo New Issue
2017-05-09 13:08 theo File Added: lazgtkw.png
2017-05-09 13:09 theo File Added: lazgtkr.png
2017-06-07 13:18 Michl LazTarget => -
2017-06-07 13:18 Michl Note Added: 0100929
2017-06-07 13:18 Michl Assigned To => Michl
2017-06-07 13:18 Michl Status new => confirmed
2017-06-07 13:18 Michl File Added: Snapshot.png
2017-06-07 13:22 Michl Note Edited: 0100929 View Revisions
2017-06-07 13:32 Michl Assigned To Michl =>
2017-06-07 16:20 Anton Kavalenka Note Added: 0100932
2017-06-07 17:12 Juha Manninen Relationship added related to 0031199
2017-06-07 17:48 Anton Kavalenka Note Edited: 0100932 View Revisions
2017-06-09 00:02 Michl Note Added: 0100955
2017-08-12 22:00 Michl Fixed in Revision => r55396
2017-08-12 22:00 Michl Status confirmed => resolved
2017-08-12 22:00 Michl Resolution open => fixed
2017-08-12 22:00 Michl Assigned To => Michl
2017-08-12 22:03 Michl Status resolved => assigned
2017-08-12 22:03 Michl Resolution fixed => reopened
2017-08-12 22:03 Michl Relationship added related to 0031496
2017-08-12 22:04 Michl Relationship added related to 0032059
2017-08-12 22:04 Michl Status assigned => resolved
2017-08-12 22:04 Michl Resolution reopened => fixed
2017-08-12 22:09 theo Note Added: 0102149
2017-08-12 22:09 theo Status resolved => closed