[Bug 167658] The dialog of Borders seems to be different from that intended
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 25 17:52:59 UTC 2025
https://bugs.documentfoundation.org/show_bug.cgi?id=167658
Michael Weghorn <m.weghorn at posteo.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |caolan.mcnamara at collabora.c
| |om
--- Comment #11 from Michael Weghorn <m.weghorn at posteo.de> ---
Thanks Parth for looking into this. :-)
(In reply to Parth Raiyani from comment #8)
> Yes, it is working fine with gtk3 but not with VCL variant of icon view. I
> guess, it is due to how the VCL variant of icon view sets the width of each
> icons. As you can see in my first attachment the selected icon in shadow
> style->position is appearing much wider(horizontal area around the icon)
> than it should be. I have also tried to give explicit width to IconView in
> UI file but it doesn't seem to work. I'm not sure how the VCL variant sets
> the width of these icons. May be we need some rework there? or I'm not sure
> if there is already a way to set width for VCL variant and I'm not aware of
> it.
I don't have a solution at hand either. From looking into the related code now,
I agree that something seems to be missing to calculate a proper size for the
icons - and the IconView itself.
attachment 202000 (to be applied on top of a series of smaller cleanups pending
in Gerrit, see series up to https://gerrit.libreoffice.org/c/core/+/188362 )
demonstrates some code areas that might be relevant.
That currently unconditionally updates the entry size in
SalInstanceIconView::insert (to update the size according to new entry) and
adds an `IconView::GetOptimalSize` to report an "optimal size" for the whole
IconView, assuming that there is always just a single row of items for
simplification of that demo.
With that demo patch in place, it looks like attachment 202001 for me with qt6
(and similar with gen).
That's of course not meant to be used as is, will break other things, but maybe
might give some hint on where to look.
> Edit: Another solution I tried is setting up explicit height and width of
> IconView's parent ScrolledWindow which makes the borders appearing in a
> single horizontal line but it looks weird both in gtk3(i.e. Border in gtk3
> when setting explicit width to ScrolledWindow.png) and in qt6 VCL(i.e.
> Border in VCL qt6 when setting explicit width to ScrolledWindow.png)
>
> Anyway, I believe the ideal way to solve this is reducing the horizontal
> spacing around the IconView in VCL qt6 but I'm not sure how we can do that.
In my understanding, hard-coding widget sizes is usually not a good idea as it
may break in all kinds of ways. Usually the layout code implemented in the
widget toolkit should be able to calculate proper sizes depending on the other
properties that are set. In the case of GTK, that already seems to work fine.
In the case of VCL - our own widget toolkit - something seems to be missing,
and it may well be that this needs to be fixed somewhere in the IconView
implementation.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libreoffice-ux-advise
mailing list