Bug 498288 - Dates in the Calendar widget are displayed incorrectly with a thin panel and/or a non-default icon theme
Summary: Dates in the Calendar widget are displayed incorrectly with a thin panel and/...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Calendar widget (show other bugs)
Version: master
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-05 20:24 UTC by John
Modified: 2025-01-09 18:54 UTC (History)
2 users (show)

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


Attachments
Screenshot of part of the panel with time(normal) and date(black) on January 5th. (7.76 KB, image/png)
2025-01-05 20:24 UTC, John
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John 2025-01-05 20:24:13 UTC
Created attachment 177131 [details]
Screenshot of part of the panel with time(normal) and date(black) on January 5th.

SUMMARY
Date of month in the calendar widget cannot be seen when using left side black panel.

STEPS TO REPRODUCE
1. Put you panel on the left side of the screen.
2. Choose Breeze Dark or any other Plasma theme where the panel is dark.
3. Put the calendar widget on this panel and select "Show day of the month"

OBSERVED RESULT
Black text of day of the month on dark panel.

EXPECTED RESULT
White text of day of the month on dark panel.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 41 Kinoite
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-01-06 19:13:21 UTC
This seems to be a combination of a bug and set of imperfect assumptions:

Bug: the digit it too big; it should be scaled down to fit in the icon

Imperfect assumption: the icon will not always have a large open white area in it since it's themable, which means a hardcoded black digit isn't ideal.
Comment 2 Marco Martin 2025-01-09 14:38:46 UTC
what icon theme is it?
Comment 3 Marco Martin 2025-01-09 14:42:41 UTC
i can reproduce black text over black icon with the papyrus icon theme, tough the day number seems to be always well sized and positioned
Comment 4 Marco Martin 2025-01-09 14:45:31 UTC
instead of an icon it should probably use custom graphics
Comment 5 Marco Martin 2025-01-09 14:50:53 UTC
it actually does, it's using a file called mini-calendar.svgz shipped by the applet itself. but yet the icon theme replaces it  anyways: i suspect is an issue with Kirigami.Icon with absolute paths
Comment 6 John 2025-01-09 15:00:31 UTC
It is the Kora Icon theme. You are right, with Breeze Icon theme it works perfectly, and shows the day correctly. It started about 3 month ago, so I suspected a KDE Bug.
Comment 7 Bug Janitor Service 2025-01-09 15:06:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1699
Comment 8 Marco Martin 2025-01-09 15:07:47 UTC
indeed, it is supposed to be a fixed svg that always make sense with it, but Kirigami::Icon was broken
Comment 9 Marco Martin 2025-01-09 15:43:23 UTC
Git commit b4e730c8fd7aaf514ee96b0b19217c88ee2188b5 by Marco Martin.
Committed on 09/01/2025 at 15:01.
Pushed by mart into branch 'master'.

Icon: fix absolute icon paths

QIcon::fromTheme() tries very hard to find an icon in the theme,
even if is an absolute path, like
/usr/share/myapp/foo.svgz, it will search in the current theme an icon
called "foo" which is now what's expected when an abcolute path is
passed.
now when a file:// source or a qrc:// source are passed, build the
QIcon with QIcon(path) instead of QICon::fromTheme(path) so
the actual file is loaded

M  +5    -2    src/primitives/icon.cpp

https://invent.kde.org/frameworks/kirigami/-/commit/b4e730c8fd7aaf514ee96b0b19217c88ee2188b5