[ease/themes] [editor] Fix alignment in Cairo rendering.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/themes] [editor] Fix alignment in Cairo rendering.
- Date: Thu, 22 Jul 2010 22:40:42 +0000 (UTC)
commit 95ff7cac6a67a99cff58b9d97ce8ddf452fbee33
Author: Nate Stedman <natesm gmail com>
Date: Thu Jul 22 18:38:23 2010 -0400
[editor] Fix alignment in Cairo rendering.
src/ease-text-element.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/ease-text-element.vala b/src/ease-text-element.vala
index 5bc2d16..40c2f63 100644
--- a/src/ease-text-element.vala
+++ b/src/ease-text-element.vala
@@ -111,6 +111,7 @@ public class Ease.TextElement : Element
layout.set_width((int)(width * Pango.SCALE));
layout.set_height((int)(height * Pango.SCALE));
layout.set_font_description(font_description);
+ layout.set_alignment(text_align); // font_description should get this...
// render
context.save();
@@ -274,8 +275,11 @@ public class Ease.TextElement : Element
return Pango.Alignment.RIGHT;
case "center":
return Pango.Alignment.CENTER;
- default:
+ case "left":
return Pango.Alignment.LEFT;
+ default:
+ error("Illegal alignment: %s", data.get(Theme.TEXT_ALIGN));
+ break;
}
}
set
@@ -292,7 +296,7 @@ public class Ease.TextElement : Element
data.set(Theme.TEXT_ALIGN, "left");
break;
default:
- error("Illegal alignment value: %s", value.to_string());
+ error("Illegal alignment: %s", value.to_string());
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]