Instead of hard-coding a size based on the icon size
for the icon views in ChartColorPalettes, rather let
the toolkit allocate a proper size.
Tweak some properties in the .ui file to achieve
proper auto-sizing.
Maybe, hard-coding the size was done because before
commit 478b712ea1
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Aug 7 09:45:15 2025 +0200
tdf#167658 vcl: Honor GtkIconView::columns + calc size
, the vcl implementation didn't take the column count
set in the .ui file into account when the original
code was was introduced in
commit a26c93a630
Date: Sun Aug 10 22:33:37 2025 +0200
chart color palettes: switch from drawingarea to IconView
.
In any case, it seems unnecessary now, and not hard-coding
the size e.g. results in all rows being visible at once
when using the gen vcl plugin for the following dialog,
instead of showing only part of them and using a scrollbar
despite there being plenty of space below the icon view.
Steps to trigger a dialog using this:
* start Writer
* "Insert" -> "Chart"
* double-click on a bar in the chart to open the
"Data Series" dialog.
* switch to the "Color Palette" tab
Now, all rows are shown at once for both, the gtk3
and the gen vcl plugins.
The code is also used in the chart palette popup
that can be triggered like this (and whose .ui
file is also tweaked in this commit a bit):
* start Writer
* "Insert" -> "Chart"
* click on a bar in the chart
* switch to the "Properties" sidebar deck
* in the "Colors" section, click on the arrow
of the button to open the popup
This commit also prepares for supporting the
dialog mentioned above with native Qt widgets
in an upcoming commit.
Change-Id: Ibf1cb597bc93f29033ab76432ca08af0b029cc0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204209
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>