Re: HiDPI support in GTK+
- From: Andoni Morales <ylatuya gmail com>
- To: Emmanuele Bassi <ebassi gmail com>, GTK Devel List <gtk-devel-list gnome org>
- Subject: Re: HiDPI support in GTK+
- Date: Thu, 29 Dec 2016 15:39:19 +0000
Hi Emmanuele,
Thank you for the clarification. For images in buttons I have created a custom AspectImage widget that renders the Pixbuf using cairo, so that side is more or less fixed. But I still have issue with the theme resources, I don't know what I need to configure to notify the theme that images are scaled x2. I am using the pixbuf engine, and if for example if I change an expander to user the resource expander.svg (which had 11px and now 22px) the expander is still rendered into a 11px region and than upscaled.
I have also tried setting NSHighResolutionCapable->true in in the OS X application, but it makes no difference.
Thanks Andoni.
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.
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]