[totem] backend: Smaller minimum size when embedded
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Smaller minimum size when embedded
- Date: Mon, 29 Apr 2013 15:26:18 +0000 (UTC)
commit 01565e552ecf6d0b0f9561bc05e65f7dcf0b9fc4
Author: Bastien Nocera <hadess hadess net>
Date: Mon Apr 29 16:14:19 2013 +0200
backend: Smaller minimum size when embedded
src/backend/bacon-video-widget.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 8179c85..10e3c71 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -236,6 +236,7 @@ struct BaconVideoWidgetPrivate
gboolean is_menu;
gboolean has_angles;
GList *chapters;
+ gboolean embedded;
BvwRotation rotation;
@@ -805,6 +806,12 @@ bacon_video_widget_get_preferred_width (GtkWidget *widget,
gint *minimum,
gint *natural)
{
+ BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
+
+ if (bvw->priv->embedded) {
+ *minimum = *natural = 240;
+ return;
+ }
/* We could also make the actor a minimum width, based on its contents */
*minimum = *natural = DEFAULT_CONTROLS_WIDTH + 2 * CONTROLS_MARGIN;
}
@@ -814,6 +821,12 @@ bacon_video_widget_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural)
{
+ BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
+
+ if (bvw->priv->embedded) {
+ *minimum = *natural = 180;
+ return;
+ }
*minimum = *natural = (DEFAULT_CONTROLS_WIDTH + 2 * CONTROLS_MARGIN) / 16 * 9;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]