| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
_gtk_icon_helper_get_size() is often used during size request and may
not necessary mean that the icon will be displayed immediately. In
many common cases we know the size without having to ensure a surface.
In many cases this means we can avoid loading an icon until needed, and
in the case of stateless IconHelpers such as GtkCellRendererPixbuf this
is very important as otherwise it will constantly be reloading icons
if the displayed set is larger than the in-memory icon cache.
https://bugzilla.gnome.org/show_bug.cgi?id=734651
|
|
|
|
|
|
|
| |
Avoids a previously set value for a different image to accidentally
stick around.
https://bugzilla.gnome.org/show_bug.cgi?id=733416
|
|
|
|
|
|
|
| |
When force_scale_pixbuf is set, the icon helper will scale the
icon to the requested size (either the pixel size, or the resolved
icon size), so we can just as well instruct the icon theme code
to do the scaling for us.
|
|
|
|
| |
This makes it easier to avoid redundant notifications in users.
|
|
|
|
|
| |
This allows styling of entry icons, treeview pixbufs and images. They
can now be forced to be symbolic or regular.
|
|
|
|
|
|
| |
In the GTK_IMAGE_ICON_NAME case, instead of keeping around the icon_name,
create a GThemedIcon and use that. This way, we can reuse the code paths
for the GTK_IMAGE_GICON case.
|
|
|
|
|
|
| |
Even when we are set a pixbuf itself.
https://bugzilla.gnome.org/show_bug.cgi?id=726271
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=709264
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=709264
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=705443
|
|
|
|
|
| |
This was missed during the pixbuf->surface conversion, so when the state
changed we were not recreating a new surface for it.
|
|
|
|
|
|
|
| |
Deprecate gtk_icon_set_render_icon_surface() and gtk_image_get_icon_set(),
which take parameters of the deprecated GtkIconSet.
https://bugzilla.gnome.org/show_bug.cgi?id=703616
|
|
|
|
|
|
|
| |
Some functions had only a deprecation comment in the .c file, or only a
deprecation annotation in the .h file. Add the missing parts.
https://bugzilla.gnome.org/show_bug.cgi?id=703616
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=702996
|
|
|
|
| |
There was one overlooked use of GTK_STOCK_MISSING_IMAGE.
|
|
|
|
|
|
|
|
|
|
|
| |
We render the source into a cairo_surface_t so that we can render it
with cairo directly, rather than having to convert it from a pixbuf
every time. We also specify the target window when creating the cairo
surface so that rendering can be faster.
Using cairo surfaces also allows us to seamlessly support window scales.
We also add a GTK_IMAGE_SURFACE source type.
|
|
|
|
|
|
| |
This is a hint on where the icon will be drawn. It
will allow us to pre-allocate cairo surfaces for the right
target.
|
|
|
|
|
| |
We want to use GtkIconTheme instead. It is worth noting that
the parts that remain undeprecated are GtkIconSize and gtk_icon_size_lookup.
|
| |
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=687025
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=687025
|
|
|
|
|
|
|
|
|
| |
There are some registred stock ids like gtk-discards that have no icons,
and you could also pass a non-registred stock id. Both of these means
gtk_style_context_lookup_icon_set returns NULL, which causes
a critical in gtk_icon_set_render_icon_pixbuf.
We avoid this by just making these render as EMPTY.
|
|
|
|
|
| |
This API is handy in entries and status icons, where the size is
limited and independent of the pixbuf size
|
| |
|
|
|
|
|
|
|
| |
Treat the empty string as if it was a NULL icon name instead of
rendering GTK_STOCK_MISSING_IMAGE.
This used to be the previous behavior of GtkCellRendererPixbuf and
applications might still rely on it.
|
|
|
|
|
| |
When we change storage type, we always clear the rest of the object, so
these checks do not add any safety.
|
|
|
|
|
| |
We can call ensure_icon_size() for an empty image; don't warn out in
that case, but just return a zero width.
|
|
|
|
|
| |
Don't reset the pixel size when clearing the helper; pixel-size is e.g a
property of GtkImage, which is stable unless explicitly set.
|
|
GtkIconHelper is a helper object to easily obtain a pixbuf from
different icon sources (e.g. a GIcon, an icon name, a stock id, ...).
Code is ported from GtkImage, which will be adapted in the next commit.
|