[Wayland-bugs] [Bug 765421] Overscaled GtkImage in Wayland

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Fri Apr 22 11:07:24 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765421

--- Comment #3 from Cédric Bellegarde <cedric.bellegarde at adishatz.org> ---
Here code example:

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GdkPixbuf, Gdk

image = Gtk.Image()
pixbuf =
GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/icons/Adwaita/256x256/apps/web-browser.png",
100*image.get_scale_factor(), 100*image.get_scale_factor())
surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, 0, None)
image.set_from_surface(surface)
win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.add(image)
win.show_all()
Gtk.main()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160422/fe96a660/attachment-0001.html>


More information about the wayland-bugs mailing list