Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Otte
12409ee075 cellrendererpixbuf: Store the texture in the iconhelper paintable
That's kinda weird but allows us to delete the texture case from
GtkIconHelper and GTK_IMAGE_TEXTURE from the GtkImageType enum.

And it doesn't cause any other problems because the cell renderer
can't deal with paintables - otherwise it would mirror GtkImage and have
a "paintable" property instead.
2018-03-16 06:04:45 +01:00
Benjamin Otte
9e54c22c49 image: Don't handle surfaces anymore
Lots of special cases that are no longer needed because no code uses
surfaces.

Also remove the GdkCellRendererPixbuf:surface property.
2018-03-16 06:04:45 +01:00
Benjamin Otte
7844320f10 image: Load resources and files into textures
Instead of loading them into surfaces (which we want to get rid of), we
load into textures.
In fact, we introduce a new paintable subclass called a GtkScaler that
takes care of tracking scaling.

This also ideally gets rid of an extra conversion once renderers learn
to render textures directly.
2018-03-16 06:04:44 +01:00
Benjamin Otte
c9557c207f iconhelper: Handle texture scale again
We will need that in the next commits.
2018-03-16 06:04:44 +01:00
Benjamin Otte
9fa1e68151 image: Implement support for paintables
This includes adding support to GtkImageDefintion and GtkIconHelper.

Only GtkImage handles support for signals from the paintable.
2018-03-16 06:04:44 +01:00
Benjamin Otte
2d959553e9 image: Add the ability to set textures
This also adds it to all other places that use the same infrastructure:
GtkEntry and GtkCellRendererPixbuf
2017-11-05 00:07:17 +01:00
Alexander Larsson
96b04836d8 Drop all uses of GdkPixbufAnimation in the gtk APIs
These are basically animated gifs, and don't fit well in how
modern things animate.
2017-10-23 16:56:49 +02:00
Alexander Larsson
0089e4ad58 Drop pixbuf support in IconHelper and ImageDefinition
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.
2017-10-23 15:28:33 +02:00
Timm Bäder
627a824cab image: Remove GtkIconSet API 2016-10-16 18:17:21 +02:00
Timm Bäder
ad155fb26c Remove GtkStock API from GtkImage 2016-10-16 18:17:21 +02:00
Christoph Reiter
47325a827b imagedefinition: The storage type is not a boolean 2015-12-19 06:13:56 +01:00
Benjamin Otte
4a42aa5229 imagedefinition: Remove icon-size
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).
2015-12-02 00:29:30 +01:00
Benjamin Otte
e666106a43 imagedefinition: Split out from icon helper
The image definition is supposed to hold the description about the image
to be displayed. The icon helper actually does caching and tracks
changes.
2015-12-02 00:29:29 +01:00