[totem] backend: Remove margins from the controls OSD
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Remove margins from the controls OSD
- Date: Thu, 3 Dec 2015 18:55:16 +0000 (UTC)
commit 45ee3a4f01d8d2d2377121f6d3e71b23980fe83e
Author: Bastien Nocera <hadess hadess net>
Date: Thu Dec 3 19:51:35 2015 +0100
backend: Remove margins from the controls OSD
This will be style as a square area running to the edges with newer
versions of GTK+:
https://git.gnome.org/browse/gtk+/commit/?id=07ee962ed34ad87138b99f8c7e86f84452f17e14
https://bugzilla.gnome.org/show_bug.cgi?id=732528
src/backend/bacon-video-controls-actor.c | 1 +
src/backend/bacon-video-widget.c | 11 ++---------
2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/backend/bacon-video-controls-actor.c b/src/backend/bacon-video-controls-actor.c
index 83e1c78..a8e2f89 100644
--- a/src/backend/bacon-video-controls-actor.c
+++ b/src/backend/bacon-video-controls-actor.c
@@ -61,6 +61,7 @@ bacon_video_controls_actor_constructed (GObject *object)
/* Theming */
gtk_style_context_add_class (gtk_widget_get_style_context (contents), "osd");
+ gtk_style_context_add_class (gtk_widget_get_style_context (contents), "bottom");
gtk_widget_override_background_color (gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (object)), 0,
&transparent);
}
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index dbdffdf..914ac2f 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -89,7 +89,6 @@
#define DEFAULT_USER_AGENT "Videos/"VERSION
-#define CONTROLS_MARGIN 32.0 /* Pixels from the bottom, left and right */
#define DEFAULT_CONTROLS_WIDTH 600 /* In pixels */
#define LOGO_SIZE 256 /* Maximum size of the logo */
#define REWIND_OR_PREVIOUS 4000
@@ -1003,7 +1002,7 @@ bacon_video_widget_get_preferred_width (GtkWidget *widget,
gint *natural)
{
/* We could also make the actor a minimum width, based on its contents */
- *minimum = *natural = DEFAULT_CONTROLS_WIDTH + 2 * CONTROLS_MARGIN;
+ *minimum = *natural = DEFAULT_CONTROLS_WIDTH;
}
static void
@@ -1011,7 +1010,7 @@ bacon_video_widget_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural)
{
- *minimum = *natural = (DEFAULT_CONTROLS_WIDTH + 2 * CONTROLS_MARGIN) / 16 * 9;
+ *minimum = *natural = DEFAULT_CONTROLS_WIDTH / 16 * 9;
}
static gboolean
@@ -6108,12 +6107,6 @@ bacon_video_widget_initable_init (GInitable *initable,
clutter_actor_add_child (layout, bvw->priv->controls);
clutter_actor_add_child (bvw->priv->stage, layout);
- g_object_set (G_OBJECT (bvw->priv->controls),
- "margin-bottom", CONTROLS_MARGIN,
- "margin-left", CONTROLS_MARGIN,
- "margin-right", CONTROLS_MARGIN,
- NULL);
-
clutter_actor_set_child_above_sibling (bvw->priv->stage,
layout,
bvw->priv->logo_frame);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]