[gedit/wip/redesign2: 9/19] Dynanically add/remove gedit-titlebar-right css style
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/redesign2: 9/19] Dynanically add/remove gedit-titlebar-right css style
- Date: Sun, 5 Jan 2014 15:10:58 +0000 (UTC)
commit a31d3acdb82555406b7f1404c6096a0cd137e453
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Jan 3 10:02:46 2014 +0100
Dynanically add/remove gedit-titlebar-right css style
gedit/gedit-window.c | 8 +++++++-
gedit/gedit-window.ui | 1 -
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index c683097..0d41c59 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -2916,19 +2916,23 @@ side_panel_visibility_changed (GSettings *settings,
const gchar *key,
GeditWindow *window)
{
+ GtkStyleContext *context;
gboolean visible;
+ context = gtk_widget_get_style_context (window->priv->headerbar);
visible = g_settings_get_boolean (settings, key);
gtk_widget_set_visible (window->priv->side_panel, visible);
- /* focus the right widget */
+ /* focus the right widget and set the right styles */
if (visible)
{
+ gtk_style_context_add_class (context, "gedit-titlebar-right");
gtk_widget_grab_focus (window->priv->side_panel);
}
else
{
+ gtk_style_context_remove_class (context, "gedit-titlebar-right");
gtk_widget_grab_focus (GTK_WIDGET (window->priv->multi_notebook));
}
}
@@ -2957,6 +2961,8 @@ setup_side_panel (GeditWindow *window)
image);
}
+
+
static void
bottom_panel_visibility_changed (GSettings *settings,
const gchar *key,
diff --git a/gedit/gedit-window.ui b/gedit/gedit-window.ui
index 0461dfd..b4c8697 100644
--- a/gedit/gedit-window.ui
+++ b/gedit/gedit-window.ui
@@ -109,7 +109,6 @@
<property name="visible">True</property>
<property name="show_close_button">True</property>
<style>
- <class name="gedit-titlebar-right"/>
<class name="titlebar"/>
</style>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]