Commit Graph

307 Commits

Author SHA1 Message Date
Carlos Garnacho
0ce649e965 Plug a bunch of leaks. 2010-12-04 15:38:09 +01:00
Carlos Garnacho
11ac0cb3e1 GtkStyle: set the active flag depending on shadow_type in draw_box(). 2010-12-04 15:37:37 +01:00
Carlos Garnacho
a3637ec60d s/child class/region/ everywhere.
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
dd8da82d1e GtkStyle: set junction details in spinbutton buttons. 2010-12-04 15:37:32 +01:00
Carlos Garnacho
143c4b3b60 GtkStyleContext: Add gtk_style_context_lookup_color().
gtk_style_lookup_color() now uses this function internally.
2010-12-04 15:37:30 +01:00
Carlos Garnacho
bd6751230a GtkStyle: Move gtk_render_* calls to default vmethod implementations. 2010-12-04 15:37:26 +01:00
Carlos Garnacho
09d6c4ea52 GtkStyle: Optionally construct above a GtkStyleContext. 2010-12-04 15:37:25 +01:00
Carlos Garnacho
17908880b5 GtkStyle: Use new render methods underneath.
This commit should probably be squashed in the future, when GtkStyleContext
is on par with it, and GtkStyle is just a shallow object on top of
GtkStyleContext and calling it in the default implementation methods, so
all gtk_paint_* and gtk_draw_* would work.
2010-12-04 15:37:09 +01:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
67284a57de API: Get rid of gtk_draw_insertion_cursor()
and rename gtk_cairo_draw_insertion_cursor() to
gtk_draw_insertion_cursor().
2010-09-26 15:11:43 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
70e6aba0d0 API: style: Remove old drawing functions 2010-09-26 15:11:42 +02:00
Benjamin Otte
9f47be2216 gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
4701bdb2a8 style: Move from colormaps to visuals 2010-09-26 15:11:32 +02:00
Benjamin Otte
ce7379a8bd style: Remove depth member from GtkStyle 2010-09-26 15:11:31 +02:00
Benjamin Otte
b09019560b style: Remove depth checks in render functions
There's no need for them anymore now that we render with Cairo.
2010-09-26 15:11:31 +02:00
Benjamin Otte
ac48f2330d API: Add gtk_cairo_draw_insertion_cursor()
For now just add it instead of replacing the current function. In the
end, this one should probably be renamed to
gtk_draw_insertion_cursor() and the current
gtk_draw_insertion_cursor() should die.
2010-09-26 15:03:00 +02:00
Benjamin Otte
84c77c0be3 style: Rewrite background handling to use cairo_pattern_t 2010-09-26 15:03:00 +02:00
Benjamin Otte
be1d190b2e style: Convert draw_spinner vfunc to Cairo version 2010-09-26 15:02:59 +02:00
Benjamin Otte
81f15cf908 style: Convert draw_resize_grip vfunc to Cairo version
Includes removal of now unused draw_simple_image_no_cairo() function
from pixbuf engine.
2010-09-26 15:02:59 +02:00
Benjamin Otte
d80e2897b9 style: Convert draw_layout vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
ff6e75adbc style: Convert draw_expander vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
e5e228debf style: Convert draw_handle vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
f0fd2e3a6e style: Convert draw_slider vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
24304a2e93 style: Convert draw_focus vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
4d4871203e style: Convert draw_extension vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
45a2656e32 style: Convert draw_box_gap vfunc to Cairo version
Includes removal of now unused draw_gap_image_no_cairo() function from
pixbuf theme engine.
2010-09-26 15:02:58 +02:00
Benjamin Otte
3f7b36d5cc style: Convert draw_shadow_gap vfunc to a Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
e1544bcc7f style: Convert draw_tab vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
f2dc8a26ed style: Convert draw_option vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
fed19bcf50 style: Convert draw_check vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
bea727a142 style: Convert draw_flat_box vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
8c325f0d60 style: Convert draw_shadow vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
e59cbd5605 style: Convert draw_vline vfunc to a Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
abaecf4308 style: Convert draw_hline vfunc to Cairo version 2010-09-26 15:02:58 +02:00
Benjamin Otte
07662f288d API: change gtk_style_apply_default_background()
It now takes a cr to apply the default background to. And it no longer
takes a set_bg parameter
2010-09-26 15:02:57 +02:00
Johan Dahlin
8736d31a04 Fix a couple of broken annotations 2010-09-23 17:57:16 -03:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Kristian Rietveld
a79d6676ac Update gtkstyle.c to account for removal of row-ending-details
The detail strings now have more "detail" by default, so gtkstyle.c
needed to be updated to properly handle this.  Tests like testtreeview,
testtreesort now have proper background drawing again.

This strncmp trick was the best I could think of so quickly, if anybody
has an idea to do this in a better way, let me know.
2010-09-13 17:13:21 +02:00
Benjamin Otte
66e860b5d1 style: Fix drawing of insensitive text
When writing the original code I erroneously assumed that the current
point of the cairo context would be saved by cairo_save/restore(), but
of course the current point is part of the path and therefor isn't
saved.

Also do a cairo_new_path() before rendering any text so that we are sure
the text ends up at the right spot.
2010-09-12 16:00:05 +02:00
Benjamin Otte
d8f3a162c8 style: Use gtk_widget_get_state() for the entry background
New code sets the entry background to GTK_STATE_ACTIVE when it has focus
and the active color in the default theme looks rather bad.
2010-09-03 17:14:17 +02:00
Javier Jardón
bf1f03ad5d gtk/gtkstyle.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Christian Persch
ffa07ee21e Use G_DEFINE_BOXED_TYPE
Bug #627214.
2010-08-18 15:34:47 +02:00
Benjamin Otte
709e05cdb2 style: Use _gtk_pango_fill_layout() 2010-08-10 21:02:31 +02:00
Benjamin Otte
ccacd3a46a style: Apply same matrix conversion as gdk_draw_layout() did
This is only necessary for GtkLabel with an angle set as no other widget
rotates text.
Note that the label code does not need these adjustments as those paths
are only taken when the label is not rotated.
2010-08-10 21:02:31 +02:00
Benjamin Otte
7b9e2b941c style: Don't use gdk_pixmap_create_from_xpm
Instead, do what that code did manually.
2010-08-10 21:02:30 +02:00
Benjamin Otte
09fbed7bc9 style: Do not allocate colors anymore 2010-08-10 21:02:30 +02:00
Kristian Rietveld
089892df27 Add missing calls to cairo_destroy() 2010-08-10 21:02:29 +02:00
Benjamin Otte
acf33c9e4c API: Remove GC members from GtkStyle 2010-08-10 21:02:29 +02:00
Benjamin Otte
66048b2f92 style: Replace last gdk_draw_rectangle() with Cairo 2010-08-10 21:02:28 +02:00