Kaydet (Commit) 8161d9cf authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Fix initial width of the color palette in welded picker

Problem can be seen with non-gtk3, if the initial
palette has no scrollbar (e.g. "standard" palette).

The cause is that in non-gtk3 we don't have overlay
scrollbars, so the palette area needs to be enlarged
when switching from a palette with a scrollbar to a
palette without a scrollbar. In practise, this was
happening also on initial show, although the palette
already had the correct width.

To fix that, start with a never scrollbar policy by
default, and add the scrollbar later if needed.

Change-Id: I5286f301b3c7ef5c72b650290ace784222f7922d
Reviewed-on: https://gerrit.libreoffice.org/56995Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
Tested-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 0e83efbc
......@@ -3634,9 +3634,6 @@ Size SvtValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesire
aSize.AdjustHeight(nTxtHeight + n + mnSpacing );
}
// sum possible ScrollBar width
aSize.AdjustWidth(GetScrollWidth());
return aSize;
}
......
......@@ -22,8 +22,6 @@
</object>
<object class="GtkPopover" id="palette_popup_window">
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">4</property>
<property name="position">bottom</property>
<property name="constrain_to">none</property>
......@@ -106,6 +104,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment