summaryrefslogtreecommitdiff
path: root/gtk/gtkiconhelper.c
Commit message (Collapse)AuthorAgeFilesLines
...
* iconhelper: Handle texture scale againBenjamin Otte2018-03-161-2/+2
| | | | We will need that in the next commits.
* iconhelper: Turn into a GObjectBenjamin Otte2018-03-161-6/+46
|
* iconhelper: Rework to allow resizing of paintablesBenjamin Otte2018-03-161-4/+64
| | | | | GtkImage will now allow paintables to be rendered to the full image and the image will be sized according to CSS rules for image sizing.
* iconhelper: Rename functionBenjamin Otte2018-03-161-19/+10
| | | | | | There are no more icon sizes, this is now the default size we render at. This naming change is kinda relevant because of CSS terminology.
* image: Implement support for paintablesBenjamin Otte2018-03-161-11/+74
| | | | | | This includes adding support to GtkImageDefintion and GtkIconHelper. Only GtkImage handles support for signals from the paintable.
* iconhelper: transition to GdkPaintableBenjamin Otte2018-03-161-58/+70
| | | | | | | | | | This is in preparation for accepting the image type paintable. It's a bit incovenient because we need more code to track width/height ourselves (as the paintable no longer does it for us), but it's not too hard. GtkIconHelper does not track invalidations on the paintable.
* icon helper: Avoid gratitious pixbuf useMatthias Clasen2017-11-301-29/+8
| | | | We can just get the texture directly from the icontheme.
* icon helper: Avoid a few string copiesMatthias Clasen2017-11-171-2/+2
|
* iconhelper: Query size via CSSMatthias Clasen2017-11-151-31/+27
| | | | | | | | Instead of looking at the icon size, look at the CSS value for -gtk-icon-size. Set style classes depending on icon size instead. Trivially change Adwaita and HighContrast to report the same values as before.
* enums: Change GtkIconSize valuesMatthias Clasen2017-11-151-2/+3
| | | | | The new values are the ones we intend to keep. The old ones had duplicated meanings and nobody knew which one to take.
* image: Remove icon-size argument from icon settersMatthias Clasen2017-11-151-10/+4
| | | | | | | | Instead, add a function gtk_image_set_icon_size() for the cases where overriding the icon size is necessary. Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear() no longer unsets the icon size.
* Simplify the gtk_snapshot_icon_texture APIMatthias Clasen2017-11-081-23/+3
| | | | | Instead of passing the color matrix in from the outside, just pass a boolean and set up the matrix internally.
* iconhelper: Don't render to surface anymoreBenjamin Otte2017-11-051-193/+108
| | | | Just go directly to texture.
* image: Add the ability to set texturesBenjamin Otte2017-11-051-0/+42
| | | | | This also adds it to all other places that use the same infrastructure: GtkEntry and GtkCellRendererPixbuf
* iconhelper: Compute surface size without icon helperBenjamin Otte2017-11-041-6/+5
| | | | This is so we can do the next batch of changes
* GskTexture => GdkTextureBenjamin Otte2017-11-041-4/+4
| | | | We want this thing to replace GdkPixbuf, so it has to live in GDK.
* Drop all uses of GdkPixbufAnimation in the gtk APIsAlexander Larsson2017-10-231-44/+0
| | | | | These are basically animated gifs, and don't fit well in how modern things animate.
* GtkIconHelper: Remove unused codeAlexander Larsson2017-10-231-50/+0
|
* Drop pixbuf support in IconHelper and ImageDefinitionAlexander Larsson2017-10-231-67/+1
| | | | | | | | | These are no longer used, instead we always covert to surface as early as possible and drop the pixbuf. This means we never store both the pixbuf and the surface at for any longer time, which is wasteful. Also, its one step further to drop GdkPixbufs from generic use in our APIs.
* Use a color matrix for symbolic iconsMatthias Clasen2017-10-231-7/+21
| | | | | The recoloring of symbolic icons is just a color matrix operation.
* Allow passing a color matrix when rendering iconsMatthias Clasen2017-10-231-1/+2
| | | | | This will be used for symbolic icons. Update all callers.
* icon helper: Use cached texturesMatthias Clasen2017-10-231-0/+64
| | | | | Use a cached texture for themed icons if we can. Currently, we only do this for non-symbolic icons.
* css: Add GTK_CSS_AFFECTS_ICON_SIZETimm Bäder2017-10-141-1/+14
| | | | | And use it in GtkIconHelper. This way, we can avoid resizes when e.g. the fg color of a symbolic icon changes.
* iconhelper: Short-circuit clear() if it's cleared alreadyTimm Bäder2017-10-141-5/+6
|
* build: Enable -Wswitch-enum and -Wswitch-defaultBenjamin Otte2017-10-061-0/+4
| | | | | | | | | | | | | | | | | | | This patch makes that work using 1 of 2 options: 1. Add all missing enums to the switch statement or 2. Cast the switch argument to a uint to avoid having to do that (mostly for GdkEventType). I even found a bug while doing that: clearing a GtkImage with a surface did not notify thae surface property. The reason for enabling this flag even though it is tedious at times is that it is very useful when adding values to an enum, because it makes GTK immediately warn about all the switch statements where this enum is relevant. And I expect changes to enums to be frequent during the GTK4 development cycle.
* iconhelper: Don't inherit from GObjectTimm Bäder2017-10-011-159/+109
| | | | | | It's not a GtkCssGadget anymore, it doesn't have any properties or signals either and it's not public. Further, its lifetime is very clear the way it's being used inside GTK+.
* iconhelper: Inherit from GObjectTimm Bäder2017-07-191-112/+28
| | | | Nothing is using any gadget API on iconhelpers anymore.
* iconhelper: Show error if fail to load placeholder iconRobert Ancell2017-06-091-1/+3
|
* iconhelper: Remove unused _draw implementationTimm Bäder2017-02-141-18/+0
|
* snapshot: Rename gtk_snapshot_translate_2d()Benjamin Otte2017-01-131-6/+6
| | | | It's now called gtk_snapshot_offset().
* Use _gtk_widget_get_window moreMatthias Clasen2017-01-101-2/+3
| | | | This avoids type checks in places where we know it is safe.
* gsk: Turn GskTexture into a GObjectBenjamin Otte2017-01-011-2/+2
|
* css: Remove -gtk-icon-effectBenjamin Otte2016-12-311-11/+1
| | | | -gtk-icon-filter replaces this now.
* iconhelper: Invalidate style before accessing textureBenjamin Otte2016-12-241-2/+2
| | | | | | Invalidating the style might cause invalidation of the texture. So we end up with a pointer to freed memory. SAD!
* snapshot: Make gtk_snapshot_get_renderer() privateBenjamin Otte2016-12-201-3/+2
| | | | | Public API doesn't need to be concerned with renderers. Worst case, they can use NULL instead of the actual renderer.
* iconhelper: Implement snapshotBenjamin Otte2016-12-191-11/+14
|
* entry: Refactor get_icon_pixbufTimm Bäder2016-12-031-1/+1
| | | | This way it will only return a pixbuf if the icon helper has a pixbuf.
* iconhelper: Ensure the surface used for textures is ARGB32Timm Bäder2016-12-031-0/+17
|
* iconhelper: Remove allocate implementationTimm Bäder2016-12-031-10/+0
|
* rendericon: Pass the scale factor when rendeirng texturesBenjamin Otte2016-11-261-1/+4
| | | | Fixes icon rendeirng on hidpi.
* snapshot: Move GtkSnapshot declaration to gtypes.hBenjamin Otte2016-11-191-0/+1
|
* snapshot: Add infrastructure to snapshot CSS imagesBenjamin Otte2016-11-161-1/+1
| | | | | Use this infrastructure to render builtin images. Which means from now on, GtkCheckbutton, GtkSpinner and a few others use snapshots.
* gsk: Rework GskTextureBenjamin Otte2016-11-161-2/+1
| | | | | | | | We do no longer bind textures to a renderer, instead they are a way for applications to provide texture data. For now, that's it. We've reverted to uploading it from scratch every frame.
* snapshot: Convert GtkSpinnerBenjamin Otte2016-11-151-6/+3
|
* image: Invalidate icon helper when unrealizingBenjamin Otte2016-11-151-1/+1
| | | | | This frees up any cached surfaces and textures in the iconhelper, ensuring that the renderer can release its texture data.
* snapshot: Convert GtkImage and GtkIconHelperBenjamin Otte2016-11-151-10/+7
| | | | | | Adds a bunch of new APIs to render textures with theming. FIXME: Cannot draw shadows for textures.
* iconhelper: Add support for GskTextureBenjamin Otte2016-11-081-0/+55
| | | | ... and use that in GtkImage.
* Remove GtkIconFactoryTimm Bäder2016-10-161-1/+0
| | | | Move the icon size lookup API into gtkicontheme.c
* image: Remove GtkIconSet APITimm Bäder2016-10-161-48/+0
|
* Remove GtkStock API from GtkImageTimm Bäder2016-10-161-33/+3
|