[totem] backend: Work around popover-over-clutter issues
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Work around popover-over-clutter issues
- Date: Tue, 4 Feb 2014 07:52:41 +0000 (UTC)
commit 4c2242f2dbad9f0a2bdea49baceb7fae07b1c588
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 3 15:53:08 2014 -0500
backend: Work around popover-over-clutter issues
Until GTK+ learns how to render popovers with transparency
on top of native subwindows, we can make the GtkVolumeButton
appear less broken by making it non-transparent.
This still looks buggy with the popover arrow.
Helps https://bugzilla.gnome.org/show_bug.cgi?id=723556
src/backend/bacon-video-controls-actor.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-controls-actor.c b/src/backend/bacon-video-controls-actor.c
index 40cd27e..efbd1d4 100644
--- a/src/backend/bacon-video-controls-actor.c
+++ b/src/backend/bacon-video-controls-actor.c
@@ -89,6 +89,28 @@ setup_object (BaconVideoControlsActor *controls,
}
static void
+setup_popover (BaconVideoControlsActor *controls)
+{
+ GtkWidget *volume_button;
+ GtkStyleContext *context;
+ GtkCssProvider *provider;
+ const gchar volume_control_css[] =
+ "GtkPopover {\n"
+ " border-radius: 0px;\n"
+ " margin: 0px;\n"
+ " padding: 0px;\n"
+ "}";
+
+ volume_button = GTK_WIDGET (g_object_get_data (G_OBJECT (controls), "volume_button"));
+ context = gtk_widget_get_style_context (gtk_scale_button_get_popup (GTK_SCALE_BUTTON
(volume_button)));
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider, volume_control_css, -1, NULL);
+ gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+}
+
+static void
bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
{
const char *objects[] = { "toolbar", NULL };
@@ -107,6 +129,8 @@ bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
setup_object (controls, "volume_button");
setup_object (controls, "time_label");
setup_object (controls, "time_rem_label");
+
+ setup_popover (controls);
}
ClutterActor *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]