[seed] ClutterPad: editor should use fixed-width font.



commit eca8717930fa4ec409ed3503b1453fd5a45ecd2d
Author: Tim Horton <hortont svn gnome org>
Date:   Thu May 14 03:22:03 2009 -0400

    ClutterPad: editor should use fixed-width font.
---
 examples/clutter-pad/clutter-pad.ui                |    5 ++++-
 .../clutter-pad/examples/animated-rectangle.js     |    6 +++---
 examples/clutter-pad/main.js                       |    2 ++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/examples/clutter-pad/clutter-pad.ui b/examples/clutter-pad/clutter-pad.ui
index 7d19b76..ef83720 100644
--- a/examples/clutter-pad/clutter-pad.ui
+++ b/examples/clutter-pad/clutter-pad.ui
@@ -97,7 +97,10 @@
                     <property name="hscrollbar_policy">automatic</property>
                     <property name="vscrollbar_policy">automatic</property>
                     <child>
-                      <object class="GtkSourceView" id="source_view" />
+                      <object class="GtkSourceView" id="source_view">
+                        <property name="indent_width">-1</property>
+                        <property name="tab_width">4</property>
+                      </object>
                     </child>
                   </object>
                 </child>
diff --git a/examples/clutter-pad/examples/animated-rectangle.js b/examples/clutter-pad/examples/animated-rectangle.js
index ad80b6b..2c90bc3 100644
--- a/examples/clutter-pad/examples/animated-rectangle.js
+++ b/examples/clutter-pad/examples/animated-rectangle.js
@@ -3,9 +3,9 @@ Clutter = imports.gi.Clutter;
 stage = Clutter.Stage.get_default();
 
 colors = [{red: 255, alpha: 255},
-                {green: 255, alpha: 255},
-                {blue: 255, alpha: 255},
-                {red: 255, green: 255, alpha: 255}]
+          {green: 255, alpha: 255},
+          {blue: 255, alpha: 255},
+          {red: 255, green: 255, alpha: 255}]
 
 for (i = 0; i < 4; i++)
 {
diff --git a/examples/clutter-pad/main.js b/examples/clutter-pad/main.js
index 0382bb7..a0ca858 100755
--- a/examples/clutter-pad/main.js
+++ b/examples/clutter-pad/main.js
@@ -9,6 +9,7 @@ GtkSource = imports.gi.GtkSource;
 GtkClutter = imports.gi.GtkClutter;
 sandbox = imports.sandbox;
 Gio = imports.gi.Gio;
+Pango = imports.gi.Pango;
 
 Gtk.init(Seed.argv);
 GtkClutter.init(Seed.argv);
@@ -192,6 +193,7 @@ ui.get_object("example_selector").signal.changed.connect(select_example);
 ui.get_object("execute_action").signal.activate.connect(execute_file);
 
 ui.get_object("source_view").set_buffer(source_buf);
+ui.get_object("source_view").modify_font(Pango.Font.description_from_string("monospace 10"));
 
 window.resize(800, 600);
 window.show_all();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]