[ocrfeeder] widgetPresenter: Improve the a11y of the BoxEditor's text style properties
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] widgetPresenter: Improve the a11y of the BoxEditor's text style properties
- Date: Thu, 1 Jul 2010 07:20:01 +0000 (UTC)
commit 455542bdee17d91cc2c16f23a4ef28cbe871b61a
Author: Joaquim Rocha <jrocha igalia com>
Date: Tue Jun 29 16:12:14 2010 +0200
widgetPresenter: Improve the a11y of the BoxEditor's text style properties
Add the tooltip text;
Set the controls' labels as their mnemonics;
Make it more GNOME HIG compliant.
studio/widgetPresenter.py | 47 +++++++++++++++++++++++++++++++++-----------
1 files changed, 35 insertions(+), 12 deletions(-)
---
diff --git a/studio/widgetPresenter.py b/studio/widgetPresenter.py
index c5b802f..c43ec44 100644
--- a/studio/widgetPresenter.py
+++ b/studio/widgetPresenter.py
@@ -417,28 +417,28 @@ class BoxEditor(gtk.ScrolledWindow):
self.align_left_button = gtk.RadioToolButton()
self.align_left_button.set_label(label)
self.align_left_button.set_icon_widget(icon)
- self.align_left_button.set_tooltip_text(_('Left aligned'))
+ self.align_left_button.set_tooltip_text(_('Set text to be left aligned'))
icon, label = lib.getIconOrLabel(gtk.STOCK_JUSTIFY_CENTER, _('Center'))
self.align_center_button = gtk.RadioToolButton()
self.align_center_button.set_label(label)
self.align_center_button.set_icon_widget(icon)
self.align_center_button.set_group(self.align_left_button)
- self.align_center_button.set_tooltip_text(_('Centered'))
+ self.align_center_button.set_tooltip_text(_('Set text to be centered'))
icon, label = lib.getIconOrLabel(gtk.STOCK_JUSTIFY_RIGHT, _('Right'))
self.align_right_button = gtk.RadioToolButton()
self.align_right_button.set_label(label)
self.align_right_button.set_icon_widget(icon)
self.align_right_button.set_group(self.align_left_button)
- self.align_right_button.set_tooltip_text(_('Right aligned'))
+ self.align_right_button.set_tooltip_text(_('Set text to be right aligned'))
icon, label = lib.getIconOrLabel(gtk.STOCK_JUSTIFY_FILL, _('Fill'))
self.align_fill_button = gtk.RadioToolButton()
self.align_fill_button.set_label(label)
self.align_fill_button.set_icon_widget(icon)
self.align_fill_button.set_group(self.align_left_button)
- self.align_fill_button.set_tooltip_text(_('Filled'))
+ self.align_fill_button.set_tooltip_text(_('Set text to be fill its area'))
return self.align_left_button, self.align_center_button, self.align_right_button, self.align_fill_button
@@ -481,16 +481,39 @@ class BoxEditor(gtk.ScrolledWindow):
spacing_frame = PlainFrame(_('Spacing'))
self.letter_spacing_spin = gtk.SpinButton(gtk.Adjustment(0.0, 0.0, 5000.0, 0.5, 100.0, 0.0), 1.0, 1)
+ self.letter_spacing_spin.set_tooltip_text(_("Set the text's letter spacing"))
self.line_spacing_spin = gtk.SpinButton(gtk.Adjustment(0.0, 0.0, 5000.0, 0.5, 100.0, 0.0), 1.0, 1)
- spacing_table = gtk.Table(2,2)
- spacing_table.attach(gtk.Label(_('Line')), 0, 1, 0, 1)
- spacing_table.attach(self.line_spacing_spin, 1, 2, 0, 1)
- spacing_table.attach(gtk.Label(_('Letter')), 0, 1, 1, 2)
- spacing_table.attach(self.letter_spacing_spin, 1, 2, 1, 2)
- spacing_frame.add(spacing_table)
+ self.line_spacing_spin.set_tooltip_text(_("Set the text's line spacing"))
+
+ box = gtk.VBox(True, 0)
+ row = gtk.HBox(False, 12)
+ size_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
+ label = gtk.Label(_('_Line:'))
+ label.set_use_underline(True)
+ label.set_mnemonic_widget(self.line_spacing_spin)
+ alignment = gtk.Alignment(0, 0.5, 0, 0)
+ alignment.add(label)
+ size_group.add_widget(alignment)
+ row.pack_start(alignment, False, False, 0)
+ row.add(self.line_spacing_spin)
+ box.pack_start(row, False, False, 0)
+
+ row = gtk.HBox(False, 12)
+ label = gtk.Label(_('L_etter:'))
+ label.set_use_underline(True)
+ label.set_mnemonic_widget(self.letter_spacing_spin)
+ alignment = gtk.Alignment(0, 0.5, 0, 0)
+ alignment.add(label)
+ size_group.add_widget(alignment)
+ row.pack_start(alignment, False, False, 0)
+ row.add(self.letter_spacing_spin)
+ box.pack_start(row, False, False, 0)
+ spacing_frame.add(box)
vbox.pack_start(spacing_frame, False)
-
- text_properties_notebook.append_page(vbox, gtk.Label( _('Style')))
+
+ label = gtk.Label( _('Sty_le'))
+ label.set_use_underline(True)
+ text_properties_notebook.append_page(vbox, label)
text_properties_notebook.set_tab_reorderable(vbox, True)
angle_box = self.__makeAngleProperty()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]