diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.py
index a085fa9..70d8fd9 100644
a
|
b
|
class Palette(PaletteWindow): |
383 | 383 | |
384 | 384 | if self._palette_state == self.PRIMARY: |
385 | 385 | self._secondary_box.hide() |
| 386 | self._widget.shrink_to_content() |
386 | 387 | |
387 | 388 | def _set_palette_state(self, state): |
388 | 389 | if self._palette_state == state: |
… |
… |
class Palette(PaletteWindow): |
390 | 391 | |
391 | 392 | if state == self.PRIMARY: |
392 | 393 | self._secondary_box.hide() |
| 394 | self._widget.shrink_to_content() |
393 | 395 | elif state == self.SECONDARY: |
394 | 396 | self._secondary_box.show() |
395 | 397 | self.update_position() |
diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py
index c48ae55..7c69271 100644
a
|
b
|
class _PaletteWindowWidget(Gtk.Window): |
276 | 276 | |
277 | 277 | self._palette = palette |
278 | 278 | self.set_decorated(False) |
279 | | self.set_resizable(False) |
| 279 | self.set_has_resize_grip(False) |
280 | 280 | self.set_position(Gtk.WindowPosition.NONE) |
281 | 281 | |
282 | 282 | context = self.get_style_context() |
… |
… |
class _PaletteWindowWidget(Gtk.Window): |
333 | 333 | # the configure request handler and finally size_allocate is called. |
334 | 334 | self._old_alloc = allocation |
335 | 335 | |
| 336 | def shrink_to_content(self): |
| 337 | minimun, natural = self.get_preferred_size() |
| 338 | self.resize(minimun.width, minimun.height) |
| 339 | |
336 | 340 | def set_invoker(self, invoker): |
337 | 341 | self._invoker = invoker |
338 | 342 | |