| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Gadgets don't connect to style-changed for widget nodes, and
GtkImage uses its widget node for the icon helper. The visible
effect of this is that symbolic icons don't change color when
switching to the dark variant of Adwaita.
Fix this by manually invalidating the icon helper.
|
|
|
|
|
| |
Was introduced as part of b79a187d47ee5c45952fab60c141fcaed7e05ef6.
Results in memory leaks (and GDI objects leaks on W32).
|
|
|
|
|
|
|
| |
Transient nodes should not propagate style-changed signals
that can cause widgets to get reallocated. This was causing
treeviews and iconviews with pixbuf cells to be constantly
resized and redrawn.
|
|
|
|
|
|
|
|
| |
When things change in the iconhelper, queue a resize on the owner widget
so that it automatically resizes.
Only do this for iconhelpers that are used as gadgets though, not for
temporary helpers - and to check this, check if the node is transient.
|
|
|
|
| |
Implement missing vfuncs
|
|
|
|
|
|
| |
When CSS, direction or scale factor change, handle the invalidation
inside the iconhelper.
This way the widgets using them don't have to.
|
|
|
|
|
|
| |
... instead of looking at the widget's style context.
This removes all calls to the style context.
|
|
|
|
| |
Note that we don't use it yet.
|
|
|
|
| |
Don't keep the owner widget ourselves.
|
|
|
|
|
| |
This is just the basic conversion to inheriting from
GTK_TYPE_CSS_GADGET.
|
|
|
|
|
| |
Use gtk_widget_get_direction() instead of
gtk_style_context_get_direction().
|
|
|
|
| |
Instead, use the widget's context.
|
|
|
|
| |
Instead use the window of the owner widget.
|
|
|
|
|
| |
Note that the caller needs to ensure the widget lives as long as the
iconhelper as the iconhelper will not ref the widget.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is the first step in replacing StyleContext usage with CssNode
usage.
|
|
|
|
|
| |
The function takes so many arguments and is so short that it's not worth
keeping.
|
|
|
|
|
|
|
|
| |
Instead of creating an icon source, making sure no state is set and
therefore the icon-effect will be applied and then rendering that icon
source, just call the icon-effect apply function.
Also, the new way isn't deprecated.
|
|
|
|
| |
All the callers where converting to a surface anyway.
|
|
|
|
|
| |
In particular, stop using deprecated code for loading the missing image
icon.
|
| |
|
|
|
|
|
| |
No need to look at the settings when the CSS has a property for the icon
theme.
|
|
|
|
|
| |
The iconfactory code doesn't use it anymore, so we don't need to track
it either.
|
|
|
|
|
| |
The code isn't used anymore. Everything uses
gtk_icon_helper_load_surface() now.
|
|
|
|
|
|
|
|
| |
The size of icons is a property that is relevant to who is rendering the
icon, not to the icon itself.
Example: Starting a DND operation from an entry icon should cause the
icon to resize (from the entr icon's size to the DND icon size).
|
|
|
|
| |
It now uses GtkImageDefinition instead.
|
|
|
|
| |
It will be used in the next patch.
|
|
|
|
|
|
|
|
| |
Make gtk_icon_helper_ensure_surface() a private function that just
ensures the surface was loaded.
Add gtk_icon_helper_load_surface() that is called by the above function
and the dnd code to actually load the surface.
|
|
|
|
|
| |
Do not assign it in the functions that actually load the surface. Make
those just return the surface.
|
|
|
|
|
|
| |
Instead, compute it on demand.
This avoids having to cache it in lots of places and simplifies code.
|
|
|
|
|
|
|
|
| |
Just do the invalidation check once, there's no need to do it in every
branch of the switch.
Also remove useless checks: These functions will not be called if we
already have a rendered surface.
|
|
|
|
|
|
|
|
| |
Just do the invalidation check once, there's no need to do it in every
branch of the switch.
Also remove useless checks: These functions will not be called if we
already have a rendered surface.
|
|
|
|
|
|
|
| |
Instead of just working for image surface, this should now work for all
bounded surfaces.
Test included.
|
|
|
|
|
| |
We do a switch on the image type, so compute the size for a certain
image type right there.
|
|
|
|
|
| |
The icon is never rendered, so there's no need for the extra iconhelper
code.
|
|
|
|
|
|
| |
The image definition is supposed to hold the description about the image
to be displayed. The icon helper actually does caching and tracks
changes.
|
| |
|
| |
|
|
|
|
| |
Various functions don't use the style context.
|
|
|
|
| |
It's not used when looking up with a GIcon.
|
|
|
|
|
|
|
| |
Passing GTK_ICON_LOOKUP_GENERIC_FALLBACK to the icon lookup doesn't work
for GIcons, so we have to make sure we use the right GThemedIcon.
Fixes image-icon-name-use-fallback reftest.
|
|
|
|
|
|
| |
A similar case in GtkIconHelper. Here we were confusing ourselves,
and compared a icon_size against -1, although the variable is
never set to -1.
|
|
|
|
|
|
|
| |
This reverts commit 63f59dde3a2740057fb24115b58100af630aa453.
It turns out, the state was not just necessary for style computation,
but also for tracking RTL and LTR. And so it broke the reftests.
|
|
|
|
| |
... and not the default one.
|