Bug 486921 - Days with a sublabel are oddly shifted up in grid view due to height calculation
Summary: Days with a sublabel are oddly shifted up in grid view due to height calculation
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Calendar widget (show other bugs)
Version: 6.0.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-12 15:56 UTC by Christian (Fuchs)
Modified: 2024-05-26 18:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of current behaviour, misaligned (left), next to proposed aligned behaviour (can be improved) (426.61 KB, image/png)
2024-05-12 15:56 UTC, Christian (Fuchs)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2024-05-12 15:56:29 UTC
Created attachment 169398 [details]
Screenshot of current behaviour, misaligned (left), next to proposed aligned behaviour (can be improved)

SUMMARY
Apparently in Plasma 6.* in the digital clock calender popup, days with holidays now not only show a coloured dot, but also the name of that holiday as a label.

Unfortunately these then have a different height than all the other items in the grid, which makes them stick out like a sore spot.

Changing 

    contentItem: Item {
        // ColumnLayout makes scrolling too slow, so use anchors to position labels

        PlasmaComponents3.ToolTip.delay: Kirigami.Units.toolTipDelay
        PlasmaComponents3.ToolTip.text: model.subLabel || ""
        PlasmaComponents3.ToolTip.visible: !!model.subLabel && (Kirigami.Settings.isMobile ? dayStyle.pressed : dayStyle.hovered)

        Kirigami.Heading {
            id: label
            anchors {
                left: parent.left
                right: parent.right
                top: parent.top
                // bottom: subDayLabel.top
                bottom: parent.bottom + Kirigami.Units.smallSpacing
            }

fixes that, but that is probably an ugly hack that might not work on all DPI / resolution combinations, thus a more robust calculation would be nice.

STEPS TO REPRODUCE
1.  Have Plasma 6
2.  Have a digital clock
3.  Have the holiday plugin enabled
4. Be in a month with a public holiday of sorts
5. Click on the clock to make the popup pop up

OBSERVED RESULT
Grid is not well aligned, days with holidays stick out despite there being plenty of space

EXPECTED RESULT
Grid is well aligned

Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-300.fc40.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8265U CPU @ 1.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20NQS30W00
System Version: ThinkPad X390 Yoga
Comment 1 Christian (Fuchs) 2024-05-12 20:46:29 UTC
Somewhat related, and could be looked into as well when changing the layout: https://bugs.kde.org/show_bug.cgi?id=470014
Comment 2 joelsonejr 2024-05-26 18:56:19 UTC
I've followed the steps suggested by the OP, and was able to observe the reported behaviour.