Opened 3 years ago

Last modified 3 years ago

#18016 new defect

[wxGTK] Tiny text size on 4K display using wxGCDC

Reported by: eran Owned by:
Priority: normal Milestone:
Component: wxGTK Version: 3.0.3
Keywords: wxGCDC HiDPI Cc: eran.ifrah@…
Blocked By: Blocking:
Patch: no

Description

Hi,
On GTK, when using 4K display, custom drawings widgets are using a tiny font. This only happens when I am using wxGCDC and only under GTK.
If I switch to wxBufferedPaintDC (or any other wxDC which is not wxGCDC) - the fonts are drawn in their normal size.

I am attaching a screenshot for comparison

Using wxWidgets 3.0.2 (the problem persists in wxWidgets 3.1)
GCC 5.4, Ubuntu 16.04 (this problem was originally reported by a user of mine using ArchLinux)

Attachments (1)

comparison-gcdc-dc.png download (76.8 KB) - added by eran 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by eran

comment:1 Changed 3 years ago by vadz

  • Keywords HiDPI added; HiRes removed

Is this with GTK+ 2 or 3?

comment:2 Changed 3 years ago by eran

  • Cc eran.ifrah@… added

GTK 2

comment:3 Changed 3 years ago by vadz

If it's GTK+ 2, it probably means that everything is scaled by default (i.e. GDK_SCALE=2, right?), but wxGC isn't. The dumbest possible fix for this would be to just explicitly scale by GDK_SCALE in wxGC when using wxGTK2.

But FWIW I think you need to use GTK+ 3 anyhow for decent HiDPI support...

Note: See TracTickets for help on using tickets.