diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2014-07-03 18:55:51 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2014-07-03 18:55:51 (GMT) |
commit | 5c8efc35e00f40aa7716438e88c9fcda426479dd (patch) | |
tree | 5f9f683bb98aad4badbb063f42534070db76326f /finance.py | |
parent | 7594ac05c54731e701f9f7f862f1c58cf3a3c960 (diff) |
Enlarge text size, align amount column and balance label at the screen left
Diffstat (limited to 'finance.py')
-rw-r--r-- | finance.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -33,6 +33,7 @@ import json from gi.repository import Gtk from gi.repository import Gdk +from gi.repository import Pango # Import Sugar UI modules. from sugar3.graphics.toggletoolbutton import ToggleToolButton @@ -179,11 +180,18 @@ class Finance(Activity): self.debitslabel = Gtk.Label() self.balancelabel = Gtk.Label() + font_size = int(style.FONT_SIZE * 1.25) + font = Pango.FontDescription("Sans %d" % font_size) + for label in (self.startlabel, self.creditslabel, self.debitslabel): + label.modify_font(font) + summarybox = Gtk.HBox() summarybox.pack_start(self.startlabel, True, False, 0) summarybox.pack_start(self.creditslabel, True, False, 0) summarybox.pack_start(self.debitslabel, True, False, 0) - summarybox.pack_start(self.balancelabel, True, False, 0) + summarybox.pack_end(self.balancelabel, True, True, + style.DEFAULT_SPACING) + self.balancelabel.set_halign(Gtk.Align.END) vbox = Gtk.VBox() |