Add menu width chars to sugar3

This commit is contained in:
Ignacio Rodriguez 2014-01-08 11:35:16 -02:00
parent 10c2bc9cf6
commit 463101b19d
3 changed files with 7 additions and 3 deletions

View File

@ -26,12 +26,14 @@ from gi.repository import Pango
from gi.repository import Gtk
from sugar3.graphics.icon import Icon
from sugar3.graphics import style
class MenuItem(Gtk.ImageMenuItem):
def __init__(self, text_label=None, icon_name=None, text_maxlen=60,
xo_color=None, file_name=None):
def __init__(self, text_label=None, icon_name=None,
text_maxlen=style.MENU_WIDTH_CHARS, xo_color=None,
file_name=None):
GObject.GObject.__init__(self)
self._accelerator = None

View File

@ -101,7 +101,7 @@ class Palette(PaletteWindow):
__gtype_name__ = 'SugarPalette'
def __init__(self, label=None, accel_path=None,
text_maxlen=60, **kwargs):
text_maxlen=style.MENU_WIDTH_CHARS, **kwargs):
# DEPRECATED: label is passed with the primary-text property,
# accel_path is set via the invoker property

View File

@ -145,3 +145,5 @@ COLOR_HIGHLIGHT = Color('#E7E7E7')
PALETTE_CURSOR_DISTANCE = zoom(10)
TOOLBAR_ARROW_SIZE = zoom(24)
MENU_WIDTH_CHARS = 60