Commit Graph

14 Commits

Author SHA1 Message Date
Benjamin Otte
95a4eff6ba render: Make gtk_render_icon() use the snapshot API
This removes a lot of duplicated code.
2018-07-24 20:55:45 +02:00
Benjamin Otte
2a11baf6ea render: Make gtk_render_check/arrow/handle() use the snapshot API
This removes a lot of duplicated code.
2018-07-24 20:55:45 +02:00
Benjamin Otte
c59948169d iconhelper: transition to GdkPaintable
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.
2018-03-16 06:04:44 +01:00
Matthias Clasen
2aa52c7d00 Simplify the gtk_snapshot_icon_texture API
Instead of passing the color matrix in from the outside,
just pass a boolean and set up the matrix internally.
2017-11-08 22:21:42 -05:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Matthias Clasen
e4cdbef092 Allow passing a color matrix when rendering icons
This will be used for symbolic icons.
Update all callers.
2017-10-23 11:44:52 +02:00
Benjamin Otte
8161f8dcca rendericon: Pass the scale factor when rendeirng textures
Fixes icon rendeirng on hidpi.
2016-11-26 11:52:30 +01:00
Benjamin Otte
2745c2502f snapshot: Move GtkSnapshot declaration to gtypes.h 2016-11-19 20:58:36 +01:00
Benjamin Otte
6d9725f7fd snapshot: Add infrastructure to snapshot CSS images
Use this infrastructure to render builtin images. Which means from now
on, GtkCheckbutton, GtkSpinner and a few others use snapshots.
2016-11-16 20:51:53 +01:00
Benjamin Otte
c0aa065ac1 snapshot: Convert GtkImage and GtkIconHelper
Adds a bunch of new APIs to render textures with theming.

FIXME: Cannot draw shadows for textures.
2016-11-15 17:49:19 +01:00
Benjamin Otte
d3cf3fd267 rendericon: Move a function
The function is identical if used for builtin icons and regular icons
(as per iconhelper). So split it out in a way that doesn't assume
either.
2015-12-16 04:46:22 +01:00
Benjamin Otte
75d7f7e756 css: Move enum
I want to use it for a gadget, so it's better in the generic file.
2015-12-16 01:50:00 +01:00
Benjamin Otte
8c745088d5 render: Split icon surface rendering out
Just like normal icons, icon surfaces belong into gtkrendericon.c.
2015-01-20 06:30:20 +01:00
Benjamin Otte
f6d64f6591 render: Split icon rendering into its own file 2015-01-20 06:30:19 +01:00