[Libreoffice-bugs] [Bug 133877] [7.0 AppImage] Toolbar and menu items are scaled incorrectly at ≥ 200% scale on KDE Plasma with KDE5 VCL

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jun 16 15:05:14 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=133877

Jan-Marek Glogowski <glogow at fbihome.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|glogow at fbihome.de           |libreoffice-bugs at lists.free
                   |                            |desktop.org
             Status|ASSIGNED                    |NEW

--- Comment #11 from Jan-Marek Glogowski <glogow at fbihome.de> ---
(In reply to Nate Graham from comment #7)
> (In reply to Jan-Marek Glogowski from comment #6)
> > BTW: you can simply test this by starting LO with GDK_SCALE=2
> > QT_SCALE_FACTOR=2. You don't need an 4k screen per-se ;-)
> > 
> > > - Toolbar and menu item icons are pixellated, not sharp.
> > The default is still to use PNG images and scale these. You have to
> > explicitly select an SVG icon set in Options >> LibreOffice >> View. If you
> > compare the 100% SVG to the 100% PNGs, you'll see why both still exist :-(
> Aha, that works!
> 
> Idea: if you're using an icon theme with an SVG option, and you're also
> using high DPI mode, automatically switch to the SVG version. In other
> words, make the default "Automatic" mode a bit smarter and able to
> dynamically switch between png and SVG versions according to DPI.

When I originally implemented the SVG iconset packaging, I wanted to implement
some automatic detection and selection for scaling and dark themes. I just
remember that "everyone" wanted to wait for user feedback of the SVG icons and
keep the PNG default, but I doubt many people use these.

So feel free to open a new bug report, but I won't work on this. LO has and
uses two SVG reader / writer implementations, which both have different bugs.
AFAIK one is a relatively fast rasterizer, while the other can deconstruct the
SVG (and other vector graphics?) into LO scene graph primitives and make the
image editable in Draw. Personally I think LO should use a common, fast
rasterizer, like librsvg, and just keep the extra importer... actually LO was
using librsvg at some point and I once wrote a patch to get rid of the LO
implementation and use librsvg again, as LO's own was much slower and buggy for
some documents...
AFAIK this was all started, because Apache can't use / didn't allow LGPL
dependencies.

IMHO LO should get rid of the PNG icons. As one can see comparing the 100%
icons, there is obviously not much motivation to fix either the icons or SVG
implementations currently.

> > - The "New" ribbon button has a downward-pointing arrow that is much too
> > large
> > I consider this a general problem. On the "Layout" page, the arrow is at
> > least placed better, but I think it's even too large at 100%. The whole
> > "New" button + dropdown arrow looks to narrow. If you click the dropdown, it
> > wrongly paints over the button icon. I'm not sure, why the implementation of
> > both widgets is separated... Looks a bit better with gtk3 or gen.
> Yeah, can confirm.

Just to make it clear. The arrow is painted by LO itself, not the native
backend. But since the HiDPI patch, the Qt5 VCL plugin got some strange toolbox
button sizing code with fixed numbers, which I missed when reviewing and
working on it:

  contentRect = QRect(boundingRect.left(), boundingRect.top(),
                      upscale(25, Round::Ceil), upscale(25, Round::Ceil));

I had a "quick" look. The code is in vcl/source/window/toolbox.cxx
ImplDrawDropdownArrow. But the whole toolbox button drawing logic looks like it
needs some overhaul, especially, if you look at the better layouted
"Layout"-tab menu buttons.

The scaling was last changed in commit e3cc5506d695b602fbd3c6ee816e36e6a76d9d96
for bug 122118. It even added a comment, which doesn't make any sense for me.

> > - The Hamburger menu in the ribbon is too small
> > This at least was easy to fix: https://gerrit.libreoffice.org/c/core/+/96390
> Nice, thanks!

(In reply to Nate Graham from comment #8)
> Is this bug report too general? Should we consider it fixed with
> https://gerrit.libreoffice.org/c/core/+/96390 and then I can file new bugs
> for the idea to automatically switch to SVG icons if available, and the
> issue with the downward-pointing arrow? What do you think?

Yeah. Just adding more stuff here won't help.

Please open two new bugs for this:
1. The toolbox button arrow size, which has a VCL and a KF5 part
  - KF5 HiDPI sizing fix for the ControlType::Toolbar, ControlPart::Button
  - Cleanup / Refactor / Fix of the toolbox button drawing code for buttons
with arrows
2. The automatic SVG selection, based on DPI settings
  - eventually needs more SVG fixes
  - eventually needs icon fixes

Then this bug can be closed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200616/5bac6c4f/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list