tdf#173695 svx: Set fixed height for ColorWindow's icon view
Following up to
commit 6296615b8d (master-android)
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Sep 29 14:20:18 2026 +0200
tdf#173695 svx: Ensure minimum height for ColorWindow
and
commit 5c53840b57
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Sep 30 10:15:59 2026 +0200
tdf#173695 svx: Increase min height for ColorWindow icon view to 250
, switch from using a minimum height of 250 to using
that as the fixed height.
The idea of using a minimum size was to still allow
using more space for the ColorWindow when a palette
with a lot of colors is initially selected.
However, the fact that the size of the popup differs
depending on what palette is initiallly selected is
considered confusing/as a bug, so instead use a fixed
height after all, see discussion in tdf#173695 for
more details/background.
A fixed height was also used when SvxColorValueSet
was still used in ColorWindow, i.e. before
commit a4d5983b4e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Jun 5 11:48:54 2026 +0200
tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView
By then, the size could more easily be optimized to
just fit the colors of the "Standard" palette. With
weld::IconView being used now, the exact spacing can
differ depending on what toolkit/theme/style is used, see
the above-mentioned 5c53840b57
for more details.
Which properties are evaluated in the .ui file
depends on the weld implementation.
While the GTK implementation evaluates
GtkScrolledWindow::min-content-height
and GtkScrolledWindow::max-content-height, the vcl one
doesn't do that. Also set GtkWidget::height-request so
the fixed height also applies for that one.
Change-Id: I7c49218872610bcf345b35849d664f85d29fdc47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211678
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -2123,11 +2123,6 @@ ColorWindow::ColorWindow(OUString rCommand,
|
||||
mxPaletteManager->ReloadColorSet(maColorIconView);
|
||||
mxPaletteManager->ReloadRecentColorSet(maRecentColorIconView);
|
||||
|
||||
// ensure minimum height to also provide space for palettes with
|
||||
// more colors when one with few colors is initially selected
|
||||
if (maColorIconView.get_size_request().Height() < 250)
|
||||
maColorIconView.set_size_request(-1, 250);
|
||||
|
||||
AddStatusListener( u".uno:ColorTableState"_ustr );
|
||||
AddStatusListener( maCommand );
|
||||
if ( maCommand == ".uno:FrameLineColor" )
|
||||
|
||||
@@ -123,20 +123,23 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="height-request">250</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="min-content-height">250</property>
|
||||
<property name="overlay-scrolling">False</property>
|
||||
<property name="max-content-height">250</property>
|
||||
<property name="propagate-natural-width">True</property>
|
||||
<property name="propagate-natural-height">True</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="coloriconview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="model">coloriconview_model</property>
|
||||
<property name="columns">12</property>
|
||||
<property name="pixbuf-column">0</property>
|
||||
|
||||
Reference in New Issue
Block a user