Bug 486921

Summary: Days with a sublabel are oddly shifted up in grid view due to height calculation
Product: [Plasma] plasmashell Reporter: Christian (Fuchs) <kde>
Component: Calendar widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: joelson.ejr, nate
Priority: NOR    
Version First Reported In: 6.0.4   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of current behaviour, misaligned (left), next to proposed aligned behaviour (can be improved)

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.
Comment 3 Nate Graham 2025-10-23 17:05:11 UTC
Ah, this was fixed a while back.