[totem] main: Fix lingering white line in fullscreen
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Fix lingering white line in fullscreen
- Date: Tue, 14 Oct 2014 17:57:24 +0000 (UTC)
commit 7cef0067894aac27d73911890b43c2a0f4b526de
Author: Bastien Nocera <hadess hadess net>
Date: Tue Oct 14 17:02:08 2014 +0200
main: Fix lingering white line in fullscreen
Hide the revealer when the animation has finished, so as to avoid
the 1-line gray-ish background when in fullscreen.
This also fixes what looked like a shadow underneath the toolbar in
windowed mode.
https://bugzilla.gnome.org/show_bug.cgi?id=723775
data/totem.ui | 2 ++
src/totem-object.c | 20 +++++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index d5a56ce..ed8197b 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -196,6 +196,8 @@
<object class="GtkRevealer" id="toolbar-revealer">
<property name="halign">fill</property>
<property name="valign">start</property>
+ <property name="visible">False</property>
+ <property name="no-show-all">True</property>
</object>
</child>
</object>
diff --git a/src/totem-object.c b/src/totem-object.c
index 5a582bf..c1d23c1 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -1562,6 +1562,9 @@ update_toolbar_visibility (TotemObject *totem,
duration = animate ? 250 : 0;
}
+ if (visible)
+ gtk_widget_show (totem->revealer);
+
/* We don't change the transition type, because it causes
* a queue resize, and it might short-circuit the animation */
gtk_revealer_set_transition_duration (GTK_REVEALER (totem->revealer), duration);
@@ -3802,6 +3805,18 @@ grilo_widget_setup (TotemObject *totem)
}
static void
+child_revealed_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ gboolean val;
+
+ g_object_get (object, "child-revealed", &val, NULL);
+ if (!val)
+ gtk_widget_hide (GTK_WIDGET (object));
+}
+
+static void
add_fullscreen_toolbar (TotemObject *totem)
{
GtkWidget *item;
@@ -3842,7 +3857,10 @@ add_fullscreen_toolbar (TotemObject *totem)
totem->fullscreen_gear_button = item;
gtk_container_add (GTK_CONTAINER (totem->revealer), totem->fullscreen_header);
- gtk_widget_show_all (totem->revealer);
+ gtk_widget_show_all (totem->fullscreen_header);
+
+ g_signal_connect (totem->revealer, "notify::child-revealed",
+ G_CALLBACK (child_revealed_changed_cb), NULL);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]