Do not calculate palette height on PaletteWindowWidget - Fixes #4792

To solve ticket #4673, we calculate the palette size using the size
of all the widgets [2]. That solves the problem on Palettes based on
_PaletteMenuWidget but on _PaletteWindowWidget produce a wrong value
when the secondary_label is not null, and as a consequence
the palette position is wrong.
The solution is do the calculation only for _PaletteMenuWidget based
palettes.

[1] https://bugs.sugarlabs.org/ticket/4673
[2] b9d6b628a9
master
Gonzalo Odiard 9 years ago
parent e990ec7703
commit 9314fd89fa

@ -621,6 +621,7 @@ class PaletteWindow(GObject.GObject):
return
req = self._widget.size_request()
if isinstance(self._widget, _PaletteMenuWidget):
# on Gtk 3.10, menu at the bottom of the screen are resized
# to not fall out, and report a wrong size.
# measure the children and move the menu - SL #4673

Loading…
Cancel
Save