Bug 487625 - Kickoff shows three items + spacing in each column instead of four items
Summary: Kickoff shows three items + spacing in each column instead of four items
Status: REOPENED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: unspecified
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-05-27 13:59 UTC by Fabian Vogt
Modified: 2024-06-11 07:46 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1


Attachments
Screenshot from openQA (407.01 KB, image/png)
2024-05-27 13:59 UTC, Fabian Vogt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2024-05-27 13:59:40 UTC
[15:37] <fvogt> Is it intentional that kickoff has some weird padding around the sides now? https://openqa.opensuse.org/tests/4223246#step/start_wayland_plasma5/3
[15:48] <NateGraham[M]> <fvogt> "Is it intentional that kickoff..." <- No. What looks to be happening is that the popup is actually several pixels too narrow
[15:51] <fvogt> NateGraham[M]: It did indeed shrink by 1-2px if I compare the images

Linked picture is also attached.
Comment 1 Fabian Vogt 2024-05-27 13:59:59 UTC
Created attachment 169876 [details]
Screenshot from openQA
Comment 2 Fabian Vogt 2024-06-09 09:24:16 UTC
Apparently this is caused by Frameworks somehow, this issue appears with Plasma 6.0.5 + Frameworks 6.3.0 as well: https://openqa.opensuse.org/tests/4258530#step/desktop_mainmenu/2

That blocks 6.3.0 from reaching Tumbleweed, raising importance.
Comment 3 Fabian Vogt 2024-06-09 19:41:34 UTC
I had a look with gammaray. The cause was immediately obvious: Many positions and sizes were fractional, offsets by values such as .00002 or .999997. The cause is that metrics from SVGs such as dialog/background were close but not quite integers.

https://invent.kde.org/plasma/libplasma/-/blob/75262424383f468105b3b15c4c5223429a644e14/src/desktoptheme/breeze/dialogs/background.svg#L357 places hint-top-inset at 9.9999999e-09 (!).

The reason this only broke now is that before 6.3.0 ksvg didn't use qreal, that was only introduced with https://invent.kde.org/frameworks/ksvg/-/commit/3dd28b0640d2c613654f992ad3453a0b92beebe1
Comment 4 Bug Janitor Service 2024-06-10 08:32:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2306
Comment 5 Akseli Lahtinen 2024-06-10 10:09:02 UTC
Git commit 91ded110530e512828a8ca3d5dd2b39be0439f78 by Akseli Lahtinen.
Committed on 10/06/2024 at 09:59.
Pushed by akselmo into branch 'master'.

kickoff/main.qml: Round backgroundMetrics

Instead of relying on the values reported by the svg's, which
can be inconsistent such as 3.999999,
round them to nearest integer.

This fixes issue with Kickoff calculating space for the items
in the item grid view.

M  +5    -5    applets/kickoff/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/91ded110530e512828a8ca3d5dd2b39be0439f78
Comment 6 Fabian Vogt 2024-06-10 10:34:23 UTC
Let's reopen this:

(In reply to Fabian Vogt from comment #3)
> I had a look with gammaray. The cause was immediately obvious: Many
> positions and sizes were fractional, offsets by values such as .00002 or
> .999997. The cause is that metrics from SVGs such as dialog/background were
> close but not quite integers.
> 
> https://invent.kde.org/plasma/libplasma/-/blob/
> 75262424383f468105b3b15c4c5223429a644e14/src/desktoptheme/breeze/dialogs/
> background.svg#L357 places hint-top-inset at 9.9999999e-09 (!).

^ isn't fixed, so any other use of SVG metrics is still broken.
Comment 7 Akseli Lahtinen 2024-06-10 10:48:47 UTC
Git commit a8aabf3c8bb4850c409007de3e7138fbc829fd2f by Akseli Lahtinen.
Committed on 10/06/2024 at 10:09.
Pushed by akselmo into branch 'Plasma/6.1'.

kickoff/main.qml: Round backgroundMetrics

Instead of relying on the values reported by the svg's, which
can be inconsistent such as 3.999999,
round them to nearest integer.

This fixes issue with Kickoff calculating space for the items
in the item grid view.


(cherry picked from commit 91ded110530e512828a8ca3d5dd2b39be0439f78)

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +5    -5    applets/kickoff/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/a8aabf3c8bb4850c409007de3e7138fbc829fd2f