| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
We want to have a get_display() method on every object
that is tied to the display, so add one here.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Add properties, and use string arrays instead of lists.
Among other things, this renames gtk_icon_theme_list_icons
to gtk_icon_theme_get_icon_names.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2410
|
| |
|
| |
|
|
|
|
| |
This returns a GFile which can represent both the above.
|
| |
|
|
|
|
| |
This causes lookup to trigger a thread that loads the icon texture.
|
|
|
|
|
| |
Also, return NULL from gtk_icon_paintable_get_filename() if the path
is really a resource path.
|
|
|
|
| |
This allows you to see which icon was actually chosen.
|
|
|
|
|
|
| |
This allows us do do what we want internally, and anyway it didn't
really do what you'd expect anymore now that we do resizing during
rendering.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If icon lookup fails or if loading it fails later, just always
fall back to the built in image-missing icon. Nobody is handling
missing icons in a sane way anyway.
If you *truly* need to handle missing icons, you need to manually
use gtk_icon_theme_has_icon().
While changing the loading code I also fixed an issue where it
was always passing "png" to pixbuf, now it also handles "xpm" if
that is the filename suffix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had a pretty complex setup where we tried to avoid scaling up themes from dirs
that specified a size. However, not only was it very complex, but it didn't quite
work with window scales, because when using e.g. a size 32 directory for 16@2x
the dir size is wrong anyway. Additionally it turns out most code either picks
an existing icon size, or uses the FORCE_SIZE flags, so it doesn't seem
like a useful behaviour.
This change drops the FORCE_SIZE flags, and always scales
icons. Additionally it moves the scaling of the icon to rendering,
which seems more modern, and allows us to (later) share icons loaded
for different sizes that happened to use the same source file (at
different scales).
Note that this changes the behaviour of
gtk_icon_paintable_download_texture() is it now returns the unscaled
source icon. However, ignore thats, as I plan to remove this function
and replace it with a way to render a paintable to a cairo-surface
instead.
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead, rely on people passing fallbacks explicitly.
Alternatively, GThemedIcon provides the functionality to create
fallbacks, which is what GtkImage and the testsuite now use.
That method is slightly better, too, so the expected test results
have been updated accordingly.
|
|
|
|
| |
This way, we can remove gtk_icon_theme_choose_icon() completely.
|
|
|
|
|
|
|
|
| |
There is no way to query contexts or do anything useful with them.
So don't keep track of them and don't make them an argument in public
APIs with the docs saying "I don't know what to use here, maybe read
some spec somewhere".
|
| |
|
|
|
|
|
|
|
|
| |
Those functions are unused and the documentation says "Returns some
random number that the icon theme creator chose" which does not seem at
all useful and an implementation detail.
So get rid of it.
|
|
|
|
|
|
|
|
| |
We expose no API to get at any colors for drawing symbolics, so we
shouldn't have APIs to draw with them.
Apart from that, those APIs look like a box of crayons, not like an
icontheme.
|
|
|
|
|
|
|
| |
If the icon theme needs to be rescanned, it should just do it.
If it doesn't, there's no need for this function.
Ergo: Don't have the function.
|
|
|
|
|
| |
If the icon theme loads SVGs or not is an implementation detail and
should not be exposed in public API.
|
|
|
|
| |
It's unused.
|
|
|
|
|
|
| |
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
|
|
|
|
|
|
|
| |
Widgets would not use them properly. In fact, the only user was using
them wrong.
As icons are loaded async by default, this call isn't necessary.
|
|
|
|
|
|
|
| |
The API encouraged wrong usage - most of the users were indeed wrong.
Use the correct version instead:
gtk_icon_theme_get_for_display (gtk_widget_get_display ())
|
|
|
|
|
| |
This is set on the GTask and lower priority will be loaded before,
this can be used to prioritize some icons for preloading.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
All users now either use it directly as a paintable or download
the texture to use the pixels.
|
| |
|
|
|
|
|
| |
This is a way to get at recolored pixels and will replace all existing users
of _load_symbolic*()
|
|
|
|
|
| |
This returns a reference to the texture (if possible) and can be
used to get access to the pixels of the icon.
|
| |
|
|
|
|
|
| |
It is better to keep icon infos as something you
only get from the icon theme.
|
|
|
|
|
|
|
| |
This function is not useful. Every icon theme
on my system either does not have that field,
or has it as 'folder'. So, just use 'folder'
when you need an example icon.
|
|
|
|
| |
Contexts in icon themes are not useful for anything.
|
|
|
|
|
| |
The GtkIconTheme/GtkIconInfo structs aren't public anymore, so use the
structs directly instead of a priv pointer.
|
|
|
|
| |
It's the same as load_icon now.
|
| |
|
| |
|
| |
|
|
|
|
| |
Loading an icon might fail.
|
|
|
|
| |
Nobody should subclass GtkIconTheme or GtkIconInfo.
|
|
|
|
|
| |
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
|
|
|
|
| |
It's not used anymore.
|
|
|
|
|
|
|
| |
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
|
|
|
|
|
| |
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
|