[mutter] theme: Set object-name on style contexts
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme: Set object-name on style contexts
- Date: Tue, 27 Oct 2015 08:43:07 +0000 (UTC)
commit 2750db2a89f32151f06312bf6002feaba44024e8
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Oct 27 09:18:32 2015 +0100
theme: Set object-name on style contexts
The default theme started to use them in GTK+ commit 371f50, so
we need to update the style contexts to keep matching the style
of client-side decorations.
https://bugzilla.gnome.org/show_bug.cgi?id=757101
src/ui/theme.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 87b4adb..db50007 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -929,6 +929,7 @@ static GtkStyleContext *
create_style_context (GType widget_type,
GtkStyleContext *parent_style,
GtkCssProvider *provider,
+ const char *object_name,
const char *first_class,
...)
{
@@ -948,6 +949,9 @@ create_style_context (GType widget_type,
gtk_widget_path_append_type (path, widget_type);
+ if (object_name)
+ gtk_widget_path_iter_set_object_name (path, -1, object_name);
+
va_start (ap, first_class);
for (name = first_class; name; name = va_arg (ap, const char *))
gtk_widget_path_iter_add_class (path, -1, name);
@@ -987,6 +991,7 @@ meta_theme_create_style_info (GdkScreen *screen,
create_style_context (META_TYPE_FRAMES,
NULL,
provider,
+ "decoration",
GTK_STYLE_CLASS_BACKGROUND,
"window-frame",
"ssd",
@@ -995,6 +1000,7 @@ meta_theme_create_style_info (GdkScreen *screen,
create_style_context (GTK_TYPE_HEADER_BAR,
style_info->styles[META_STYLE_ELEMENT_FRAME],
provider,
+ NULL,
GTK_STYLE_CLASS_TITLEBAR,
GTK_STYLE_CLASS_HORIZONTAL,
"default-decoration",
@@ -1004,12 +1010,14 @@ meta_theme_create_style_info (GdkScreen *screen,
create_style_context (GTK_TYPE_LABEL,
style_info->styles[META_STYLE_ELEMENT_TITLEBAR],
provider,
+ NULL,
GTK_STYLE_CLASS_TITLE,
NULL);
style_info->styles[META_STYLE_ELEMENT_BUTTON] =
create_style_context (GTK_TYPE_BUTTON,
style_info->styles[META_STYLE_ELEMENT_TITLEBAR],
provider,
+ NULL,
GTK_STYLE_CLASS_BUTTON,
"titlebutton",
NULL);
@@ -1017,6 +1025,7 @@ meta_theme_create_style_info (GdkScreen *screen,
create_style_context (GTK_TYPE_IMAGE,
style_info->styles[META_STYLE_ELEMENT_BUTTON],
provider,
+ NULL,
NULL);
return style_info;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]