From aad6832ac5d6499c39721f48f6fc83a4581a03f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Thu, 8 Nov 2012 18:47:04 -0300
Subject: [PATCH toolkit 2/2] Update style of Description palette - SL #4167
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
We can now use the PaletteMenuBox.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
---
src/sugar3/activity/widgets.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/sugar3/activity/widgets.py b/src/sugar3/activity/widgets.py
index 699674c..03b2415 100644
a
|
b
|
from sugar3.graphics.xocolor import XoColor |
32 | 32 | from sugar3.graphics.icon import Icon |
33 | 33 | from sugar3.bundle.activitybundle import ActivityBundle |
34 | 34 | from sugar3.graphics import style |
| 35 | from sugar3.graphics.palettemenu import PaletteMenuBox |
35 | 36 | |
36 | 37 | |
37 | 38 | _ = lambda msg: gettext.dgettext('sugar-toolkit', msg) |
… |
… |
class DescriptionItem(Gtk.ToolItem): |
230 | 231 | description_button.props.hide_tooltip_on_click = False |
231 | 232 | self._palette = description_button.get_palette() |
232 | 233 | |
233 | | description_box = Gtk.HBox() |
| 234 | description_box = PaletteMenuBox() |
234 | 235 | sw = Gtk.ScrolledWindow() |
235 | 236 | sw.set_size_request(int(Gdk.Screen.width() / 2), |
236 | 237 | 2 * style.GRID_CELL_SIZE) |
… |
… |
class DescriptionItem(Gtk.ToolItem): |
246 | 247 | self._text_view.connect('focus-out-event', |
247 | 248 | self.__description_changed_cb, activity) |
248 | 249 | sw.add(self._text_view) |
249 | | description_box.pack_start(sw, False, True, 0) |
| 250 | description_box.append_item(sw, vertical_padding=0) |
250 | 251 | self._palette.set_content(description_box) |
251 | 252 | description_box.show_all() |
252 | 253 | |