summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-12-16 17:31:00 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-01-09 14:06:24 -0500
commit22a3126a2b8c71040e12a15a90aa47bde9cca3cd (patch)
tree200f7991d9e5420e511cdbf5d877534975e55973 /src/ui
parent9596c24f83181076d469813edaefc9db110ca789 (diff)
downloadmutter-22a3126a2b8c71040e12a15a90aa47bde9cca3cd.tar.gz
theme: Make meta_frame_draw_theme take a GtkStyleContext instead of a widget
The style context of the widget is rarely what we want. We won't fix this to be a MetaFrames style context yet; this just changes the internal API. https://bugzilla.gnome.org/show_bug.cgi?id=690317
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/frames.c22
-rw-r--r--src/ui/preview-widget.c2
-rw-r--r--src/ui/theme-private.h16
-rw-r--r--src/ui/theme-viewer.c2
-rw-r--r--src/ui/theme.c49
5 files changed, 27 insertions, 64 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index dcc18ce2e..8e5fe060b 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2011,17 +2011,17 @@ meta_frames_paint (MetaFrames *frames,
meta_prefs_get_button_layout (&button_layout);
- meta_theme_draw_frame_with_style (meta_theme_get_current (),
- frame->style,
- cr,
- type,
- flags,
- w, h,
- frame->layout,
- frame->text_height,
- &button_layout,
- button_states,
- mini_icon, icon);
+ meta_theme_draw_frame (meta_theme_get_current (),
+ frame->style,
+ cr,
+ type,
+ flags,
+ w, h,
+ frame->layout,
+ frame->text_height,
+ &button_layout,
+ button_states,
+ mini_icon, icon);
}
static void
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index a411e8a7f..52ca0e6b0 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -212,7 +212,7 @@ meta_preview_draw (GtkWidget *widget,
client_height = 1;
meta_theme_draw_frame (preview->theme,
- widget,
+ gtk_widget_get_style_context (widget),
cr,
preview->type,
preview->flags,
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index 278fa41fc..b5c61c38f 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -1023,7 +1023,7 @@ double meta_theme_get_title_scale (MetaTheme *theme,
MetaFrameFlags flags);
void meta_theme_draw_frame (MetaTheme *theme,
- GtkWidget *widget,
+ GtkStyleContext *style_gtk,
cairo_t *cr,
MetaFrameType type,
MetaFrameFlags flags,
@@ -1036,20 +1036,6 @@ void meta_theme_draw_frame (MetaTheme *theme,
GdkPixbuf *mini_icon,
GdkPixbuf *icon);
-void meta_theme_draw_frame_with_style (MetaTheme *theme,
- GtkStyleContext *style_gtk,
- cairo_t *cr,
- MetaFrameType type,
- MetaFrameFlags flags,
- int client_width,
- int client_height,
- PangoLayout *title_layout,
- int text_height,
- const MetaButtonLayout *button_layout,
- MetaButtonState button_states[META_BUTTON_TYPE_LAST],
- GdkPixbuf *mini_icon,
- GdkPixbuf *icon);
-
void meta_theme_get_frame_borders (MetaTheme *theme,
MetaFrameType type,
int text_height,
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index 32cb27d7e..bed82aa91 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -1024,7 +1024,7 @@ run_theme_benchmark (void)
cr = cairo_create (pixmap);
meta_theme_draw_frame (global_theme,
- widget,
+ gtk_widget_get_style_context (widget),
cr,
META_FRAME_TYPE_NORMAL,
get_flags (widget),
diff --git a/src/ui/theme.c b/src/ui/theme.c
index d53794ca9..892bc4080 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -5439,19 +5439,19 @@ meta_theme_get_title_scale (MetaTheme *theme,
}
void
-meta_theme_draw_frame_with_style (MetaTheme *theme,
- GtkStyleContext *style_gtk,
- cairo_t *cr,
- MetaFrameType type,
- MetaFrameFlags flags,
- int client_width,
- int client_height,
- PangoLayout *title_layout,
- int text_height,
- const MetaButtonLayout *button_layout,
- MetaButtonState button_states[META_BUTTON_TYPE_LAST],
- GdkPixbuf *mini_icon,
- GdkPixbuf *icon)
+meta_theme_draw_frame (MetaTheme *theme,
+ GtkStyleContext *style_gtk,
+ cairo_t *cr,
+ MetaFrameType type,
+ MetaFrameFlags flags,
+ int client_width,
+ int client_height,
+ PangoLayout *title_layout,
+ int text_height,
+ const MetaButtonLayout *button_layout,
+ MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ GdkPixbuf *mini_icon,
+ GdkPixbuf *icon)
{
MetaFrameGeometry fgeom;
MetaFrameStyle *style;
@@ -5485,29 +5485,6 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
}
void
-meta_theme_draw_frame (MetaTheme *theme,
- GtkWidget *widget,
- cairo_t *cr,
- MetaFrameType type,
- MetaFrameFlags flags,
- int client_width,
- int client_height,
- PangoLayout *title_layout,
- int text_height,
- const MetaButtonLayout *button_layout,
- MetaButtonState button_states[META_BUTTON_TYPE_LAST],
- GdkPixbuf *mini_icon,
- GdkPixbuf *icon)
-{
- meta_theme_draw_frame_with_style (theme, gtk_widget_get_style_context (widget),
- cr, type,flags,
- client_width, client_height,
- title_layout, text_height,
- button_layout, button_states,
- mini_icon, icon);
-}
-
-void
meta_theme_get_frame_borders (MetaTheme *theme,
MetaFrameType type,
int text_height,