Re: HiDPI support in GTK+



Hi;

No: HiDpi (window scaling) support is not something available in GTK 2.x, and it cannot be backported to it from GTK 3.x, given the complex redesign of the internals and the necessary API additions.

You should either port to GTK 3.x (for which there's a branch of Gtk#) or you will have to ship your own theme, icons/assets, and configuration to run at 2x on suitable displays.

Ciao,
 Emmanuele.

On Mon, 26 Dec 2016 at 11:08, Andoni Morales <ylatuya gmail com> wrote:
Hi everyone!

We have a cross platform application named LongoMatch running in several platforms in which we use GTK+, Linux, Windows and OS X. For historical reasons and being a Mono C# app we are still using GTK+ 2, the latest release in the 2.24 series and Cairo 1.14.
We are having some troubles rendering correctly images and themes in HiDPI displays. Fonts and our custom widgets using Cairo are rendered correctly so GDK and Cairo seems to be doing their job correctly with respect to device scales. But Gtk.Images, like the ones in buttons, and icons/resources from the theme are being upscaled. All our image resources are SVG, so they can scale correctly. For example, in a retina display with x2, a GTK image of 22x22 dp is being drawn in 22x22px and than upscaled to 44X44px. If I have a button of 22dp I would like to pass it an Image of 22px x Scale = 44px so that the image is rendered correctly without being upscaled.
Is this possible with the current release of Gtk+2 or should I backport something from Gtk+3 to make it happen?

Cheers,
Andoni



_______________________________________________

gtk-devel-list mailing list

gtk-devel-list gnome org

https://mail.gnome.org/mailman/listinfo/gtk-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]