[ease/text] Improved Layout.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/text] Improved Layout.
- Date: Thu, 20 Jan 2011 11:12:04 +0000 (UTC)
commit 2e394f891674aeba40ef29caf7f95d35466a59e3
Author: Nate Stedman <natesm gmail com>
Date: Fri Dec 24 02:31:26 2010 -0500
Improved Layout.
ease-core/ease-layout.vala | 32 ++++++++++++--------------------
1 files changed, 12 insertions(+), 20 deletions(-)
---
diff --git a/ease-core/ease-layout.vala b/ease-core/ease-layout.vala
index d5b869e..d801c73 100644
--- a/ease-core/ease-layout.vala
+++ b/ease-core/ease-layout.vala
@@ -68,26 +68,6 @@ public class Ease.Layout : GLib.Object
}
/**
- * The size of the layout as a two item array. Arrays not of length 2 will
- * be ignored.
- */
- public int[] size
- {
- owned get { return { width, height }; }
- set
- {
- if (value.length != 2)
- {
- critical("Layout size must be a two item array, not %i",
- value.length);
- return;
- }
- width = value[0];
- height = value[1];
- }
- }
-
- /**
* The actual rendered width of the layout, in pixels. This cannot be set.
*/
public int width_px
@@ -171,5 +151,17 @@ public class Ease.Layout : GLib.Object
// restore empty text if necessary
layout.set_text(text, (int)text.length);
}
+
+ /*
+ * Sets the size of the Layout.
+ *
+ * @param width The width.
+ * @param height The height.
+ */
+ public void set_size(int width, int height)
+ {
+ layout.set_width(width);
+ layout.set_height(height);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]