[glide] Visual tweaks
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Visual tweaks
- Date: Thu, 6 May 2010 11:55:08 +0000 (UTC)
commit 7828b968c2b70a7c97d9e11edec8bc495699fc1f
Author: Robert Carr <racarr Valentine localdomain>
Date: Thu May 6 06:24:13 2010 -0400
Visual tweaks
libglide/glide-inspector-notebook.c | 2 +-
libglide/glide-inspector-window.c | 2 +-
libglide/glide-stage-manager.c | 39 ++++++++++++++++++++++++++++++++--
libglide/glide-window.c | 6 +++++
4 files changed, 44 insertions(+), 5 deletions(-)
---
diff --git a/libglide/glide-inspector-notebook.c b/libglide/glide-inspector-notebook.c
index 874d468..6b04217 100644
--- a/libglide/glide-inspector-notebook.c
+++ b/libglide/glide-inspector-notebook.c
@@ -64,7 +64,7 @@ glide_inspector_notebook_selection_changed (GlideStageManager *manager,
if (GLIDE_IS_SLIDE (selection))
{
- gtk_notebook_set_current_page (notebook, PAGE_SLIDE);
+ gtk_notebook_set_current_page (notebook, PAGE_ANIMATIONS);
}
else if (GLIDE_IS_TEXT (selection))
{
diff --git a/libglide/glide-inspector-window.c b/libglide/glide-inspector-window.c
index a2e0299..f8f308c 100644
--- a/libglide/glide-inspector-window.c
+++ b/libglide/glide-inspector-window.c
@@ -69,7 +69,7 @@ glide_inspector_window_position (GlideInspectorWindow *window)
width = gdk_screen_get_width (screen);
height = gdk_screen_get_height (screen);
- gtk_window_move (GTK_WINDOW (window), .7*width, .3*height);
+ gtk_window_move (GTK_WINDOW (window), .85*width, .25*height);
}
static void
diff --git a/libglide/glide-stage-manager.c b/libglide/glide-stage-manager.c
index 658d125..4f77601 100644
--- a/libglide/glide-stage-manager.c
+++ b/libglide/glide-stage-manager.c
@@ -53,10 +53,37 @@ enum {
static guint stage_manager_signals[LAST_SIGNAL] = { 0, };
static void
+glide_stage_manager_effect_fade_completed (ClutterTimeline *t, gpointer user_data)
+{
+ ClutterActor *a = (ClutterActor *)user_data;
+
+ clutter_actor_set_opacity (a, 0xff);
+ clutter_actor_hide (a);
+}
+
+static void
+glide_stage_manager_effect_fade (ClutterActor *a, ClutterActor *b)
+{
+ ClutterTimeline *timeline = clutter_timeline_new (350);
+
+ clutter_actor_show_all (b);
+ clutter_actor_raise (b, a);
+
+ clutter_actor_set_opacity (b, 0x00);
+
+ clutter_actor_animate_with_timeline (a, CLUTTER_LINEAR, timeline, "opacity", 0x00, NULL);
+ clutter_actor_animate_with_timeline (b, CLUTTER_LINEAR, timeline, "opacity", 0xff, NULL);
+
+ clutter_timeline_start (timeline);
+
+ g_signal_connect (timeline, "completed", G_CALLBACK (glide_stage_manager_effect_fade_completed), a);
+}
+
+static void
glide_stage_manager_effect_fade_in (ClutterActor *actor)
{
clutter_actor_set_opacity (actor, 0x00);
- clutter_actor_animate (actor, CLUTTER_LINEAR, 300, "opacity", 0xff, NULL);
+ clutter_actor_animate (actor, CLUTTER_LINEAR, 500, "opacity", 0xff, NULL);
}
static void
@@ -178,9 +205,15 @@ glide_stage_manager_set_slide (GlideStageManager *manager, guint slide)
{
GlideSlide *s = glide_document_get_nth_slide (manager->priv->document, slide);
if (manager->priv->current_slide >= 0 && !(manager->priv->current_slide >= glide_document_get_n_slides(manager->priv->document)))
- clutter_actor_hide (CLUTTER_ACTOR (glide_document_get_nth_slide (manager->priv->document, manager->priv->current_slide)));
+ {
+ glide_stage_manager_effect_fade (CLUTTER_ACTOR (glide_document_get_nth_slide (manager->priv->document,
+ manager->priv->current_slide)),
+ CLUTTER_ACTOR (s));
+ }
+ else
+ clutter_actor_show_all (CLUTTER_ACTOR (s));
manager->priv->current_slide = slide;
- clutter_actor_show_all (CLUTTER_ACTOR (s));
+
glide_stage_manager_add_manipulator (manager);
glide_stage_manager_set_selection (manager, GLIDE_ACTOR (s));
diff --git a/libglide/glide-window.c b/libglide/glide-window.c
index f0a89c6..967a0da 100644
--- a/libglide/glide-window.c
+++ b/libglide/glide-window.c
@@ -1298,6 +1298,12 @@ glide_window_init (GlideWindow *window)
gtk_window_maximize (GTK_WINDOW (window));
glide_window_new_document_real (window);
+ glide_window_new_text_action_activate (NULL, window);
+
+ glide_stage_manager_set_selection (window->priv->manager,
+ GLIDE_ACTOR( glide_document_get_nth_slide (window->priv->document,
+ glide_stage_manager_get_current_slide (window->priv->manager))));
+
// g_signal_connect (window, "hide", G_CALLBACK (glide_window_hide), window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]