[ease/themes] [editor] Fixed handle flipping getting "stuck"
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/themes] [editor] Fixed handle flipping getting "stuck"
- Date: Thu, 22 Jul 2010 01:49:22 +0000 (UTC)
commit ac4edf11e5d80fdc3a29eb14d452635df61bdfce
Author: Nate Stedman <natesm gmail com>
Date: Wed Jul 21 20:28:08 2010 -0400
[editor] Fixed handle flipping getting "stuck"
- Also changed default handle appearance.
src/ease-editor-embed.vala | 7 ++++---
src/ease-handle.vala | 8 ++++----
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/ease-editor-embed.vala b/src/ease-editor-embed.vala
index c299f28..528e6bb 100644
--- a/src/ease-editor-embed.vala
+++ b/src/ease-editor-embed.vala
@@ -260,7 +260,8 @@ public class Ease.EditorEmbed : ScrollableEmbed
if (slide_actor != null)
{
contents.remove_actor(slide_actor);
- for (unowned List<Clutter.Actor>* itr = slide_actor.contents.get_children();
+ for (unowned List<Clutter.Actor>* itr =
+ slide_actor.contents.get_children();
itr != null;
itr = itr->next)
{
@@ -525,7 +526,7 @@ public class Ease.EditorEmbed : ScrollableEmbed
*/
private bool handle_clicked(Clutter.Actor sender, Clutter.ButtonEvent event)
{
- (sender as Handle).flip();
+ (sender as Handle).flip(true);
is_dragging = true;
is_drag_initialized = false;
sender.motion_event.connect(handle_motion);
@@ -548,7 +549,7 @@ public class Ease.EditorEmbed : ScrollableEmbed
{
if (is_dragging)
{
- (sender as Handle).flip();
+ (sender as Handle).flip(false);
is_dragging = false;
sender.motion_event.disconnect(handle_motion);
diff --git a/src/ease-handle.vala b/src/ease-handle.vala
index f24516c..2452ffc 100644
--- a/src/ease-handle.vala
+++ b/src/ease-handle.vala
@@ -223,9 +223,9 @@ public class Ease.Handle : Clutter.CairoTexture
/**
* Flips the colors of the handle.
*/
- public void flip()
+ public void flip(bool f)
{
- flipped = !flipped;
+ flipped = f;
redraw();
}
@@ -238,12 +238,12 @@ public class Ease.Handle : Clutter.CairoTexture
cr.arc(SIZE / 2, SIZE / 2, SIZE / 4, 0, 2 * 3.1415);
// fill the circle
- if (flipped) cr.set_source_rgba(1, 1, 1, 1);
+ if (!flipped) cr.set_source_rgba(1, 1, 1, 1);
else cr.set_source_rgba(0, 0, 0, 1);
cr.fill_preserve();
// stroke the circle
- if (flipped) cr.set_source_rgba(0, 0, 0, 1);
+ if (!flipped) cr.set_source_rgba(0, 0, 0, 1);
else cr.set_source_rgba(1, 1, 1, 1);
cr.stroke();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]