diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-23 04:30:34 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-27 21:16:57 +0800 |
commit | 3873c839159fefbe9001338d6f162b610e4f4284 (patch) | |
tree | 6f28a862ad2fd52a17c0e7cb19124a0b675022e9 /src/empathy-call-window.c | |
parent | d9c6227d30e2eb6521421c01f03749e8a4c576e9 (diff) | |
download | gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.tar gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.tar.gz gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.tar.bz2 gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.tar.lz gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.tar.xz gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.tar.zst gsoc2013-empathy-3873c839159fefbe9001338d6f162b610e4f4284.zip |
call-window: don't use EmpathyRoundedActor for the floating toolbar
Make this a real toolbar, and add a CSS provider to set the correct
border radius.
In the future, GTK and Adwaita will support an 'OSD' style class that
takes care of this automatically, but right now we have add these few
lines of code.
https://bugzilla.gnome.org/show_bug.cgi?id=672560
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r-- | src/empathy-call-window.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 1ddec200b..49723c6dd 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -1559,6 +1559,8 @@ empathy_call_window_init (EmpathyCallWindow *self) ClutterConstraint *constraint; ClutterActor *remote_avatar; GtkStyleContext *context; + GtkCssProvider *provider; + GdkRGBA transparent = { 0., 0., 0., 0. }; GdkRGBA rgba; ClutterColor bg; @@ -1620,6 +1622,17 @@ empathy_call_window_init (EmpathyCallWindow *self) "menupreviewswap", "activate", empathy_call_window_swap_camera_cb, NULL); + /* FIXME: we should use a stock "OSD" style class for the toolbar, + * once it's available in GTK+/Adwaita. + */ + provider = gtk_css_provider_new (); + gtk_css_provider_load_from_data (provider, + "#CallFloatingToolbar { border-radius: 6px; }", -1, NULL); + gtk_style_context_add_provider ( + gtk_widget_get_style_context (priv->bottom_toolbar), + GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_object_unref (provider); + gtk_action_set_sensitive (priv->menu_fullscreen, FALSE); priv->camera_monitor = empathy_camera_monitor_dup_singleton (); @@ -1707,8 +1720,11 @@ empathy_call_window_init (EmpathyCallWindow *self) create_audio_input (self); create_video_input (self); - priv->floating_toolbar = empathy_rounded_actor_new (2); - clutter_actor_set_margin_bottom (priv->floating_toolbar, FLOATING_TOOLBAR_SPACING); + priv->floating_toolbar = gtk_clutter_actor_new (); + gtk_widget_override_background_color ( + gtk_clutter_actor_get_widget ( + GTK_CLUTTER_ACTOR (priv->floating_toolbar)), + GTK_STATE_FLAG_NORMAL, &transparent); gtk_widget_reparent (priv->bottom_toolbar, gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (priv->floating_toolbar))); |