[caribou] Update width calculation method.
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] Update width calculation method.
- Date: Mon, 5 Sep 2011 22:14:56 +0000 (UTC)
commit 910255cccf6908c2727f2379f1bdef97b24011fa
Author: Eitan Isaacson <eitan monotonous org>
Date: Mon Sep 5 12:29:26 2011 -0700
Update width calculation method.
caribou/antler/keyboard_view.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/caribou/antler/keyboard_view.py b/caribou/antler/keyboard_view.py
index 350be91..14914a9 100644
--- a/caribou/antler/keyboard_view.py
+++ b/caribou/antler/keyboard_view.py
@@ -87,8 +87,9 @@ class AntlerKey(Gtk.Button):
if self.caribou_key():
self.caribou_key().release()
- def do_get_preferred_width_for_height(self, h):
+ def do_get_preferred_width(self):
w = self.caribou_key().props.width
+ h, _ = self.get_preferred_height()
width = int(h * w + ceil(w - 1) * self._spacing)
return (width, width)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]