[caribou] tweaked AntlerKeyboardView appearance.



commit cec8c785c4c0893581e288db603cb38e235a24e3
Author: Eitan Isaacson <eitan monotonous org>
Date:   Thu May 5 15:14:42 2011 -0400

    tweaked AntlerKeyboardView appearance.

 caribou/antler/keyboard_view.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/caribou/antler/keyboard_view.py b/caribou/antler/keyboard_view.py
index ded45a9..30d5c02 100644
--- a/caribou/antler/keyboard_view.py
+++ b/caribou/antler/keyboard_view.py
@@ -26,6 +26,11 @@ class AntlerKey(Gtk.Button):
         self.connect("pressed", self._on_pressed)
         self.connect("released", self._on_released)
         self.set_label(self._get_key_label())
+
+        label = self.get_child()
+        label.set_use_markup(True)
+        label.props.margin = 6
+
         if key.props.name == "Caribou_Prefs":
             key.connect("key-clicked", self._on_prefs_clicked)
         if key.get_extended_keys ():
@@ -49,7 +54,7 @@ class AntlerKey(Gtk.Button):
             if not unichar.isspace() and unichar != u'\x00':
                 label = unichar
 
-        return label
+        return "<b>%s</b>" % glib.markup_escape_text(label.encode('utf-8'))
 
     def _on_pressed(self, button):
         self.caribou_key.press()
@@ -61,7 +66,7 @@ class AntlerKey(Gtk.Button):
         return (w, w)
 
     def do_get_request_mode(self):
-        return Gtk.SizeRequestMode.HEIGHT_FOR_WIDTH
+        return Gtk.SizeRequestMode.WIDTH_FOR_HEIGHT
 
 class AntlerSubLevel(Gtk.Window):
     def __init__(self, key):
@@ -97,8 +102,8 @@ class AntlerLayout(Gtk.Grid):
         gobject.GObject.__init__(self)
         self.set_column_homogeneous(True)
         self.set_row_homogeneous(True)
-        self.set_row_spacing(4)
-        self.set_column_spacing(4)
+        self.set_row_spacing(6)
+        self.set_column_spacing(6)
         if level:
             self.load_rows(level.get_rows ())
 



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