Add menu width chars to sugar3

master
Ignacio Rodriguez 11 years ago
parent 10c2bc9cf6
commit 463101b19d

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

@ -101,7 +101,7 @@ class Palette(PaletteWindow):
__gtype_name__ = 'SugarPalette' __gtype_name__ = 'SugarPalette'
def __init__(self, label=None, accel_path=None, 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, # DEPRECATED: label is passed with the primary-text property,
# accel_path is set via the invoker property # accel_path is set via the invoker property

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