Summary: | Date in vertical panels is too big until panel is manually resized | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Christian Muehlhaeuser <muesli> |
Component: | Digital Clock | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | ashakeel.me, dev-kde, dicorned, glax, groot, kde, leviatan1, nate, piotr.mierzwinski, rikshaw76, sunny.bed7466, wolftune, zmogas |
Priority: | NOR | Keywords: | regression |
Version: | 5.18.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/commit/fcbfbcbfeca9a31c5ed39ecb6fdc43476b1cd08a | Version Fixed In: | 5.21 |
Attachments: |
Date font size changing upon resizing the panel
Screenie of resized panel Width after resizing differs from initial width fix for custom date format How my date would initially look before this change How my time and date looks now Date with seconds added The same panel in Plasma 5.20 and 5.21 right before and after the upgrade Dante incorrectly scaled Date-scalled corectly System fonts settings Vertical_Panel-Date.-1_70px ertical_Panel-Date.-2_68pix |
Description
Christian Muehlhaeuser
2020-02-19 00:08:03 UTC
Could you attach a screenshot? Or even better, a screen recording? The time string is supposed to grow and shrink dynamically as well. Created attachment 126237 [details]
Date font size changing upon resizing the panel
Find a screen recording attached!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Requested information was added with comment 2; changing status for inspection. Created attachment 126912 [details]
Screenie of resized panel
Can reproduce on 5.18, FreeBSD, X11, frameworks 5.66
*** Bug 418886 has been marked as a duplicate of this bug. *** *** Bug 417728 has been marked as a duplicate of this bug. *** Created attachment 126918 [details]
Width after resizing differs from initial width
@ngraham: Your patch indeed makes the date behave like in previous releases again! However I noticed it's still not quite consistent in its behavior: when I start plasmashell freshly, the date is a lot wider than after resizing it to roughly the same width. I've added a new attachment, which hopefully explains what I'm trying to say. Git commit 01691632b5238ac993b59eebe693fefc88130b8f by Nate Graham. Committed on 24/03/2020 at 15:26. Pushed by ngraham into branch 'Plasma/5.18'. [applets/digital-clock] Fix date sizing in vertical panel Summary: This patch fixes several errors in the code: - The property is named `font.minimumPixelSize`, not `minimumPixelSize` - The calculation in `minimumPixelSize` did not make sense - Setting the height to `dateLabel.paintedHeight` is nonsensical FIXED-IN: 5.18.4 Test Plan: {F8186873} Reviewers: #vdg, #plasma, cblack, davidedmundson Reviewed By: #vdg, #plasma, cblack, davidedmundson Subscribers: davidedmundson, cblack, muesli, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D28172 M +1 -2 applets/digital-clock/package/contents/ui/DigitalClock.qml https://commits.kde.org/plasma-workspace/01691632b5238ac993b59eebe693fefc88130b8f Re-opening as it's not fully fixed yet. I am seeing this issue myself on KDE Neon 5.20.0 Specifically, I had the two parts of date (in my case the format `ddd d`) split on two lines, both big font. Resizing down and then back fixed it. But I found another fix as well: By switching the ISO date format, it was just on one line. When I then switched back to `ddd d` it stayed on one line correctly. This is annoying though, and I hope it gets fixed. I also found these likely duplicate tickets: https://bugs.kde.org/show_bug.cgi?id=418589 https://bugs.kde.org/show_bug.cgi?id=420607 https://bugs.kde.org/show_bug.cgi?id=425870 and these are not the same but are related because they involve the question of font size and of single vs multiple lines: https://bugs.kde.org/show_bug.cgi?id=376307 https://bugs.kde.org/show_bug.cgi?id=422532 *** Bug 418589 has been marked as a duplicate of this bug. *** *** Bug 420607 has been marked as a duplicate of this bug. *** *** Bug 425870 has been marked as a duplicate of this bug. *** Thanks, they are indeed. *** Bug 429693 has been marked as a duplicate of this bug. *** *** Bug 431029 has been marked as a duplicate of this bug. *** The strange thing here is that if we apply different date type format, like "Custom: ddd d" then just after this activity the font is OK. Only the problem appears when we relogin or restart of the Plasma. (In reply to Piotr Mierzwinski from comment #20) > The strange thing here is that if we apply different date type format, like > "Custom: ddd d" then just after this activity the font is OK. Only the > problem appears when we relogin or restart of the Plasma. I fix it changing "/" for "-" in custom date. In my case: d-M-yyyy (In reply to francisco_t from comment #21) > (In reply to Piotr Mierzwinski from comment #20) > > The strange thing here is that if we apply different date type format, like > > "Custom: ddd d" then just after this activity the font is OK. Only the > > problem appears when we relogin or restart of the Plasma. > > I fix it changing "/" for "-" in custom date. In my case: d-M-yyyy Unfortunately this helps partially only. After restart of Plasma font still is bigger than this one in time, and bigger after very first set. Second issue is that after I added character between (",") date has been split onto two rows (in case of three letters name of day), of course with big font. Simple test showing that font is too big. 1. Set "Date format" as "ISO Date" or "Short Date" and press Apply You will get small font (smaller than in watch) 2. Set "Date format" as "Custom" and for example "ddd d" You will get font size like in watch 3. Restart Plasma either relogin or restart PC You will get font with very big size The worst part is that, we cannot set size this even by configuration file, I think. Or I don't know proper entry to set (and proper file). Basically confirming what Piotr wrote most recently: - on a freshly installed KaOS (because that defaults to a vertical panel) in a VM - resize the vertical panel (it is on the right) to 110px wide - right-mouse-click the clock, pick *Configure Digital Clock* - in the *Appearance* tab, choose *Date format* and pick *ISO date* from the drop-down. Today is 2021-01-13. Click apply. - Result: big text for time, smaller text for date, both approximately fill the horizontal width of the panel. - Close settings, then logout and login again. - The date is still shown "small". - Do the same thing, but now pick *Custom format* and use `ddd d` as suggested by Piotr. This displays for me, today, *mie 13* but that's because I have Nicaraguan time format selected elsewhere. - Close settings, logout, login. - Result: huge text for the date. - Switching back to ISO date gets me small text again, also after logout and login. If I pick *long date*, I get teeny-tiny letters because it is hard to fit "miercoles, 13 de enero de 2021" in 110px across; it is spread on two lines. After logout and login, the letters are larger, and spread to 4 lines: "miercoles," "13 de" "enero de" "2021". I can go through the settings dance again to get the letters "back to normal". Reproducing on KDE neon: - developer edition neon-developer-20210111-1849.iso - boot from the ISO (in VirtualBox I get a 1024x768 screen, not ideal, but it is workable) - RMB on the panel (at the bottom) and pick *edit panel* - drag the panel to the right edge of the screen, then resize to 110px wide (note that "dragging" in the panel-sizer-number-input box is reversed: towards the edge makes the panel wider, away from the edge smaller: I think this is reported and fixed elsewhere) - log out; you are automatically logged in again - date display is now huge A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/572 Created attachment 134860 [details]
fix for custom date format
Is that based on Marco's patch? Either way please submit patches via invent.kde.org, thanks! :) (In reply to Nate Graham from comment #27) > Is that based on Marco's patch? Either way please submit patches via > invent.kde.org, thanks! :) Yes. This is exactly his patch. Only I didn't finish my post, and got collision because you sent yours (In reply to Bug Janitor Service from comment #25) > A possibly relevant merge request was started @ > https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/572 I restested this patch and seems it works like a charm. Note I tested it only for issue I reported, so related with custom date format like "ddd d". I attach patch file generated from merge_requests/572. If anyone needs to fix issue and retest it then let follow below short instruction (works in Arch based distro): 1. sudo cp 572.diff /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/ 2. sudo patch < 572.diff 3 restart plasma or relogin Thank you for fixing. Git commit fcbfbcbfeca9a31c5ed39ecb6fdc43476b1cd08a by Nate Graham, on behalf of Marco Martin. Committed on 15/01/2021 at 16:15. Pushed by ngraham into branch 'master'. properly size date label in vertical panels the Text.Fit sizing policy will size the font in order to fit given a fixed size of the label, but it can't really cause the other way around which we need: cause a vertical resize in order to accomodate a larger font. In order to fake that, we fix the date label to an arbitrary tall height (will overflow outside the applet) and then size the applet based on the label contentheight instead, leaving the invisible part of the label outside. In order to avoid the huge text it used to have, limit the maximum size to an arbitrarly small value, in this case Math.min(0.7 * timeLabel.height, theme.defaultFont.pixelSize * 1.4) FIXED-IN: 5.21 M +14 -3 applets/digital-clock/package/contents/ui/DigitalClock.qml https://invent.kde.org/plasma/plasma-workspace/commit/fcbfbcbfeca9a31c5ed39ecb6fdc43476b1cd08a *** Bug 432003 has been marked as a duplicate of this bug. *** IMO the font, even after this fix, is still too big. I like to have my vertical panel just wide enough to have 2 columns of system tray icons. With this configuration I used to be able to (at least initially) have the date all on one row. Now the date is too big and always wraps over 2 rows. Could we perhaps even have an option just to set the font size manually? To clarify my previous comment, I have my date set in custom "ddd d" format. Created attachment 135225 [details]
How my date would initially look before this change
This is how my date would initially look before this change. This was fine. Perhaps the date could have been slightly larger, but not a problem
Created attachment 135226 [details]
How my time and date looks now
This is a screenshot of my time and date looks now - IMO the date is too big.
Paul, unless you're still seeing this in 5.21, it's the bug reported here, not a matter of configurability, adding further options is not the right fix. Created attachment 135227 [details]
Date with seconds added
Yes, I'm talking about the fix in 5.21 beta (5.20.90) still being strange.
Ironically, if you add to display the seconds, everything displays smaller and fits OK.
(In reply to Paul M from comment #37) > Created attachment 135227 [details] > Date with seconds added > > Yes, I'm talking about the fix in 5.21 beta (5.20.90) still being strange. > > Ironically, if you add to display the seconds, everything displays smaller > and fits OK. There is nothing strange about this. If you will add seconds then font is reduced to fit all the numbers on the watch. Notice that a watch has more characters (+3) so there is more place for the date. I think the matter is that the font in a watch is the same like in the date. In your example (screenshot) in the date there is 6 characters (Wed 27) whilst in a watch you have 5 only., and if is used the same font size then for sure one from them will don't fit. In my opinion some solution could be decrease font for the date at least with 1 point comparing to the watch. In my case (also format: "ddd d") this issue doesn't appear because I changed font on Italic and a bit increased of width my panel. *** Bug 432708 has been marked as a duplicate of this bug. *** Created attachment 135831 [details]
The same panel in Plasma 5.20 and 5.21 right before and after the upgrade
Hi Nate, I read about this in your Plasma 5.21 blog post. I just did the upgrade. One of my systems uses a vertical panel, and now its clock looks thus. There is no distance between the two lines anymore. I had to think of this bug report immediately. Could it be related?
The font actually has some metrics in it to have some padding. I know that because when I decided for it, I tried other 7-segment fonts in a horizontal panel and one of the other fonts had no padding to the edge of the panel at all, whereas this one did.
That regression might have been caused by the fix for this, but it would need its own bug report to be actionable. Can you file one? Also, please mention which font and style your clock is using. Thanks! I double-checked the font settings. It is in fact the one without any built-in outside margin in terms of line height*. :) So this issue is probably not Plasma’s department after all, even though it worked before™. However, the margin between the clock text and the edge of the panel is now much smaller. It was not visible on my earlier screenshot with a leading "1", but now, at "20:36", the 2 actually touches the left edge of the screen. And the trailing digit is now very close to the workspace-facing edge of the panel. And there is of course the one nitpick that the date is now smaller than the time. This has its pros and cons, but you can’t satisfy everyone. :o) *) The font is DSEG7 classic bold from https://www.keshikan.net/fonts-e.html Seems scaling of date still doesn't work correctly. Please look at attached screenshot. Please notice that others day are correctly displayed. Created attachment 136932 [details]
Dante incorrectly scaled
What version of Plasma are you using? This looks like it might be a separate issue. Does manually resizing the panel fix it? (In reply to Nate Graham from comment #45) > What version of Plasma are you using? This looks like it might be a separate > issue. Does manually resizing the panel fix it? Operating System: Antergos Linux KDE Plasma Version: 5.21.3 KDE Frameworks Version: 5.80.0 Qt Version: 5.15.2 Kernel Version: 5.11.7-arch1-1 OS Type: 64-bit Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz Memory: 15,5 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 530 Reopened due to fix doesn't work in the newest stable version. It is working fine for me. Does the problem go away if you manually resize the panel, as I asked before? Can you please attach a screen recording that shows this? (In reply to Nate Graham from comment #48) > It is working fine for me. Does the problem go away if you manually resize > the panel, as I asked before? Can you please attach a screen recording that > shows this? For me also works, but only at days different than Sunday and with 1 digit in day number. I suppose you have locale "US", so your names of day are shorter and thanks that always names fit originaly set panel width. Please use PL, and check date at Sunday, then you will see date in two lines instead of one. Suggesting increase width in my opinion is not solution only workaround. To be honest I expected decrease size of font, which still cannot be be decreased/increased in configuration. Please notice that polish translators cannot change this name of day to be shorter, like for example with "Nie", just because this word has own meaning in our language and means "No". I'm not 100% sure, but I think that in calendars in an English-speaking country the short for November isn't "No", only "Nov", to avoid misleading. I'm not suggesting that you increase the width as a fix; I'm trying to understand whether that workaround still works. If it does, then this bug is not fully fixed and we can re-open it. If it does not, then the issue you're seeing is in fact a slightly different bug, and we should leave this one closed and file a new one to track the fix for that. Does that make sense to you? (In reply to Nate Graham from comment #50) > I'm not suggesting that you increase the width as a fix; I'm trying to > understand whether that workaround still works. If it does, then this bug is > not fully fixed and we can re-open it. If it does not, then the issue you're > seeing is in fact a slightly different bug, and we should leave this one > closed and file a new one to track the fix for that. > > Does that make sense to you? Sorry for misunderstanding, now I found you asked for resize panel to check if problem still persists. I increased width and got date in one line. For example today the day is displayed correctly (with original width of panel) - check attached screenshot. The issue happens only when Sunday happen and day has number contains 2 digits for other is fine. Created attachment 136954 [details]
Date-scalled corectly
Ok I guess it's the same issue. :( Looks like you found an edge case we need to handle as well. Reducing priority as most issues were fixed; just this little one remains. Issue still persists (for custom date: "ddd d"). When I increase panel to 70 pixels then (today date) "pon.16" fits to panel width, if it has 68 pixels width I get wrapped date, so "pon." in one line, and "16" in second (check attached screen shot). Size of date font seems to be the same like time. I think that date and time should be scaled when I increase and decrease panel width, just to fit panel width. It doesn't happen. I checked this also in up-to-dated KDE Neon. and behavior is the same. My system font is "Noto" (for more details please check screenshot) Plasma 5.22.4 KFrameworks 5.85 Qt 5.15.2 (with kde patches) Graphics Platform: X11 Created attachment 140780 [details]
System fonts settings
Created attachment 140782 [details]
Vertical_Panel-Date.-1_70px
Created attachment 140783 [details]
ertical_Panel-Date.-2_68pix
I can't reproduce this anymore in Plasma 5.24. (In reply to Nate Graham from comment #59) > I can't reproduce this anymore in Plasma 5.24. Neither can I. I'm on latest KDE Neon user edition. I haven't seen this problem in a long time. :) Awesome! (In reply to Nate Graham from comment #61) > Awesome! Sorry, did you set locale on polish and set date as Sunday for two digits day like today? For me issue happens for such settings. I mean date is wrapped on 2 lines. Panel width is 82 (I use default font in Neon). Please notice that fo thisr Saturday (in polish: sob.22) all is fine with mentioned width of panel. I expected that font used in date would change its size during changing width of panel. This doesn't happen at all. All time font has the same size, nothing is adjusted. In result I need to resize panel to 100 to have hole date in one line: "niedz.23". Of course it depends on font used in system. I tested this in recent Neon unstable edition with update done after just midnight. Re-reading the issue you had that you re-opened this bug for, it's a separate issue. Please file it as a new bug report. |