summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2014-02-05 13:15:08 -0800
committerMatt Watson <mattdangerw@gmail.com>2014-02-05 13:20:52 -0800
commit7c93c8adc3a1c64298993a92d959e4cf894ce23d (patch)
tree84e5b56cc3422c51eb06b4a814b2484148d45d7f /endless
parent024886a49afbf4756440a7744548e482e118820b (diff)
Rounded corners on unmaximized top bar
The window manager already does this for most programs. But we have to do it ourselves in the SDK as we have self decorated windows [endlessm/eos-sdk#551]
Diffstat (limited to 'endless')
-rw-r--r--endless/eostopbar.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/endless/eostopbar.c b/endless/eostopbar.c
index 735ba6c..85f4753 100644
--- a/endless/eostopbar.c
+++ b/endless/eostopbar.c
@@ -18,6 +18,7 @@
* The action buttons area contain "minimize", "maximize" and "close" buttons.
*/
#define _EOS_STYLE_CLASS_TOP_BAR "top-bar"
+#define _EOS_STYLE_CLASS_UNMAXIMIZED "unmaximized"
#define _EOS_TOP_BAR_HEIGHT_PX 36
#define _EOS_TOP_BAR_BUTTON_PADDING_PX 4
#define _EOS_TOP_BAR_ICON_SIZE_PX 16
@@ -344,4 +345,10 @@ eos_top_bar_update_window_maximized (EosTopBar *self,
gtk_image_set_from_icon_name (GTK_IMAGE (priv->maximize_icon),
icon_name,
GTK_ICON_SIZE_SMALL_TOOLBAR);
+
+ GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (self));
+ if (!is_maximized)
+ gtk_style_context_add_class (context, _EOS_STYLE_CLASS_UNMAXIMIZED);
+ else
+ gtk_style_context_remove_class (context, _EOS_STYLE_CLASS_UNMAXIMIZED);
}