summaryrefslogtreecommitdiff
path: root/gtk/gtkiconhelper.c
Commit message (Collapse)AuthorAgeFilesLines
* Make gtk_icon_helper_invalidate privateTimm Bäder2016-02-071-1/+1
|
* Add and use gtk_icon_helper_invalidate_for_changeTimm Bäder2016-02-071-2/+17
|
* iconhelper: Save whether the surface is symbolicTimm Bäder2016-02-071-0/+9
|
* iconhelper: Un-duplicate some codeTimm Bäder2016-02-071-5/+2
|
* Make sure icons update on theme changeMatthias Clasen2016-01-041-1/+1
| | | | | | | | | 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.
* Fix a surface leakРуслан Ижбулатов2015-12-271-0/+3
| | | | | Was introduced as part of b79a187d47ee5c45952fab60c141fcaed7e05ef6. Results in memory leaks (and GDI objects leaks on W32).
* icon helper: suppress style_changed when transientMatthias Clasen2015-12-181-1/+2
| | | | | | | 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.
* iconhelper: Queue resize on invalidationBenjamin Otte2015-12-151-0/+4
| | | | | | | | 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.
* iconhelper: Finish gadget conversionBenjamin Otte2015-12-151-0/+77
| | | | Implement missing vfuncs
* iconhelper: Handle invalidationBenjamin Otte2015-12-151-40/+47
| | | | | | When CSS, direction or scale factor change, handle the invalidation inside the iconhelper. This way the widgets using them don't have to.
* iconhelper: Use the gadget's nodeBenjamin Otte2015-12-151-24/+17
| | | | | | ... instead of looking at the widget's style context. This removes all calls to the style context.
* iconhelper: Require passing a cssnode to the constructorBenjamin Otte2015-12-151-1/+4
| | | | Note that we don't use it yet.
* iconhelper: Use the gadget's owner propertyBenjamin Otte2015-12-151-24/+17
| | | | Don't keep the owner widget ourselves.
* iconhelper: Turn into gadgetBenjamin Otte2015-12-151-5/+5
| | | | | This is just the basic conversion to inheriting from GTK_TYPE_CSS_GADGET.
* iconhelper_ Don't use deprecated functionsBenjamin Otte2015-12-091-11/+5
| | | | | Use gtk_widget_get_direction() instead of gtk_style_context_get_direction().
* iconhelper: Remove the context argumentBenjamin Otte2015-12-091-4/+8
| | | | Instead, use the widget's context.
* iconhelper: Get rid of _gtk_icon_helper_set_window()Benjamin Otte2015-12-091-36/+7
| | | | Instead use the window of the owner widget.
* iconhelper: Require a widget as construction argumentBenjamin Otte2015-12-091-2/+11
| | | | | Note that the caller needs to ensure the widget lives as long as the iconhelper as the iconhelper will not ref the widget.
* iconhelper: Pass only the CssStyle when loading pixbufsBenjamin Otte2015-12-091-7/+9
|
* iconhelper: Remove unused GtkStyleContext parametersBenjamin Otte2015-12-091-5/+2
|
* iconhelper: Pass only the CssStyle when loading iconsetsBenjamin Otte2015-12-091-14/+32
|
* iconhelper: Pass only the CssStyle when loading iconsBenjamin Otte2015-12-091-20/+48
| | | | | This is the first step in replacing StyleContext usage with CssNode usage.
* iconhelper: Fold function into callersBenjamin Otte2015-12-041-20/+14
| | | | | The function takes so many arguments and is so short that it's not worth keeping.
* iconhelper: Apply icon-effect directlyBenjamin Otte2015-12-041-24/+4
| | | | | | | | 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.
* iconhelper: Return surface from icon-effect functionBenjamin Otte2015-12-041-20/+17
| | | | All the callers where converting to a surface anyway.
* iconhelper: Refactor missing icon handlingBenjamin Otte2015-12-041-27/+24
| | | | | In particular, stop using deprecated code for loading the missing image icon.
* iconhelper: Fold function into only callerBenjamin Otte2015-12-041-34/+20
|
* css: Query icon theme from style, not from settingsBenjamin Otte2015-12-021-1/+3
| | | | | No need to look at the settings when the CSS has a property for the icon theme.
* iconhelper: Stop tracking stateBenjamin Otte2015-12-021-6/+0
| | | | | The iconfactory code doesn't use it anymore, so we don't need to track it either.
* iconhelper: Remove _gtk_icon_helper_ensure_pixbuf()Benjamin Otte2015-12-021-240/+0
| | | | | The code isn't used anymore. Everything uses gtk_icon_helper_load_surface() now.
* imagedefinition: Remove icon-sizeBenjamin Otte2015-12-021-10/+8
| | | | | | | | 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).
* dnd: Rewrite iconhelper codeBenjamin Otte2015-12-021-0/+6
| | | | It now uses GtkImageDefinition instead.
* iconhelper: Add a scale argument to gtk_icon_helper_load_surface()Benjamin Otte2015-12-021-13/+20
| | | | It will be used in the next patch.
* iconhelper: Refactor ensure_surface()Benjamin Otte2015-12-021-17/+21
| | | | | | | | 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.
* iconhelper: Store surface in ensure_surface()Benjamin Otte2015-12-021-33/+32
| | | | | Do not assign it in the functions that actually load the surface. Make those just return the surface.
* iconhelper: Don't store surface sizeBenjamin Otte2015-12-021-20/+1
| | | | | | Instead, compute it on demand. This avoids having to cache it in lots of places and simplifies code.
* iconhelper: Move invalidation checkBenjamin Otte2015-12-021-18/+3
| | | | | | | | 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.
* iconhelper: Move invalidation checkBenjamin Otte2015-12-021-19/+3
| | | | | | | | 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.
* iconhelper: Improve size determination for surfacesBenjamin Otte2015-12-021-12/+16
| | | | | | | Instead of just working for image surface, this should now work for all bounded surfaces. Test included.
* iconhelper: Move size computationBenjamin Otte2015-12-021-7/+8
| | | | | We do a switch on the image type, so compute the size for a certain image type right there.
* dragsource: Store an itemdefinition, not an iconhelperBenjamin Otte2015-12-021-1/+10
| | | | | The icon is never rendered, so there's no need for the extra iconhelper code.
* imagedefinition: Split out from icon helperBenjamin Otte2015-12-021-191/+163
| | | | | | The image definition is supposed to hold the description about the image to be displayed. The icon helper actually does caching and tracks changes.
* iconhelper: Don't include gtk.hBenjamin Otte2015-11-251-0/+2
|
* iconhelper: Remove unused functionBenjamin Otte2015-11-251-6/+0
|
* iconhelper: Remove unused context argumentBenjamin Otte2015-11-251-13/+11
| | | | Various functions don't use the style context.
* iconhelper: Don't pass GENERIC_FALLBACK flagBenjamin Otte2015-10-281-2/+0
| | | | It's not used when looking up with a GIcon.
* iconhelper: Track icon-name fallback usage in the GIconBenjamin Otte2015-10-081-1/+14
| | | | | | | 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.
* More of the sameMatthias Clasen2015-03-221-1/+1
| | | | | | 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.
* Revert "iconhelper: Don't check states"Benjamin Otte2015-03-121-2/+36
| | | | | | | 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.
* iconhelper: Use the screen's icon themeBenjamin Otte2015-03-121-2/+2
| | | | ... and not the default one.