Bug 277433 - Days of week in calendar popup of clock widget doesn't fit space well
Summary: Days of week in calendar popup of clock widget doesn't fit space well
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-clock (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 278673 278860 284754 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-09 19:16 UTC by bill p. (aka google01103)
Modified: 2012-03-01 11:05 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
calendar widget (19.62 KB, image/png)
2011-07-12 10:00 UTC, bill p. (aka google01103)
Details
Calendar issue screenshot (362.59 KB, image/png)
2011-08-08 10:54 UTC, Dhaval Patel
Details
Taller (181.71 KB, image/jpeg)
2011-10-06 06:20 UTC, Antonio Orefice
Details
Too small text (38.59 KB, image/png)
2011-10-30 11:40 UTC, Christoph Feck
Details
Make the week day format size-dependent (3.34 KB, patch)
2011-10-30 21:45 UTC, Fredrik Höglund
Details
Default setting of calendar window shows correct format (31.12 KB, image/png)
2011-12-19 18:19 UTC, Roman Bysh
Details
Default setting of calendar window shows incorrect format in 12.1 (60.42 KB, image/png)
2011-12-19 18:22 UTC, Roman Bysh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bill p. (aka google01103) 2011-07-09 19:16:51 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Days of week in calendar popup of clock widget doesn't fit space well - using the 3 letter abbreviation of the days of does not work in alloted space

http://simplest-image-hosting.net/png-0-cal


Reproducible: Always

Steps to Reproduce:
open calendar

Actual Results:  
letters over run each other

Expected Results:  
better spacing - either a narrower font, smaller font or single day of week abbreviation
Comment 1 bill p. (aka google01103) 2011-07-10 17:14:18 UTC
also, the calendar an extra column on the right which appears to be the last 6 numerical days of the displayed month
Comment 2 Anne-Marie Mahfouf 2011-07-12 07:27:15 UTC
Please attach the screenshot inside the bug report, thanks.
Comment 3 bill p. (aka google01103) 2011-07-12 10:00:47 UTC
Created attachment 61797 [details]
calendar widget
Comment 4 bill p. (aka google01103) 2011-07-12 10:01:05 UTC
Platform Version 4.6.95 (4.7 RC2) "release 1"
OpenSuse 64bit
Comment 5 bill p. (aka google01103) 2011-07-24 10:06:34 UTC
been told the extra column is the week number - so obviously that's not a bug
Comment 6 Aaron J. Seigo 2011-07-30 18:26:36 UTC
*** Bug 278860 has been marked as a duplicate of this bug. ***
Comment 7 Gael Beaudoin 2011-08-01 08:20:41 UTC
*** Bug 278673 has been marked as a duplicate of this bug. ***
Comment 8 ealexp 2011-08-01 09:40:58 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 Dhaval Patel 2011-08-01 14:09:14 UTC
Running KDE 4.7 on Kubuntu 11.04 and I can see the problem.

Rather than just making the fonts smaller, can somebody spend sometime to make the calendar look better? Choose a different font family or decorations if needed. The calendar looks bad compared to the rest of the desktop. It does not have a clean and simple look.

Here is what I think is a nice looking calendar.

http://swipe.nokia.com/img/features/feat-bundle1.jpg
Comment 10 Jan Gerrit Marker 2011-08-07 15:36:47 UTC
@Dhaval Patel:
Which desktop theme are you using? I can't reproduce it here with trunk and standard Air (German and English).
Comment 11 Alexander Smirnov 2011-08-08 07:03:58 UTC
I've tried about 10 different themes, and the issue is reproduced with any of them. My default theme is Tibanna
Comment 12 Dhaval Patel 2011-08-08 10:54:02 UTC
Created attachment 62657 [details]
Calendar issue screenshot

This is the Air theme in KDE.
Comment 13 Dhaval Patel 2011-08-08 10:56:15 UTC
@Jan Gerrit Marker: As you can see from the screenshot I am using the Air theme. The fonts in the calendar are definitely wacked.
Comment 14 Fitzcarraldo 2011-08-30 18:40:05 UTC
I experienced the same problem with KDE SC 4.7.0, but have found that if I hover the mouse cursor over the top left corner of the pop-up calendar, left-click and reduce the size of the pop-up calendar pane, suddenly the font corrects itself and everything fits nicely.
Comment 15 Antonio Orefice 2011-09-13 17:10:21 UTC
if you make the calendar taller, the effect is even worse.
Comment 16 Hussam Al-Tayeb 2011-09-20 13:24:22 UTC
http://i.imgur.com/L4MgE.png
Please note that this is a regression from 4.6.x
Still not addressed in kde 4.7.1
Comment 17 Hussam Al-Tayeb 2011-10-06 01:26:26 UTC
it seems to ignore my kde font settings. someone said on #kde in freenode that plasma has it's own font settings. how do I change those?
Comment 18 Antonio Orefice 2011-10-06 06:19:44 UTC
Even if it would respect your font settings, i don't think you can orkaround:(see attachment "taller"
Comment 19 Antonio Orefice 2011-10-06 06:20:44 UTC
Created attachment 64268 [details]
Taller
Comment 20 mathesis 2011-10-18 18:26:05 UTC
I also experience the same bug on a fresh kubuntu 11.10 installation + update to 4.7.2 (official repository).
Comment 21 R (Chandra) Chandrasekhar 2011-10-19 08:08:23 UTC
I am on a fresh install of Kubuntu 11.10 with the standard KDE Software Compilation, Platform Version,  4.1.7, and I experience the same problem. The ugliness of this bug does not belong in KDE!
Comment 22 R (Chandra) Chandrasekhar 2011-10-19 08:09:19 UTC
I am on a fresh install of Kubuntu 11.10 with the standard KDE Software Compilation, Platform Version,  4.1.7, and I experience the same problem. The ugliness of this bug does not belong in KDE!
Comment 23 Christoph Feck 2011-10-23 09:10:30 UTC
*** Bug 284754 has been marked as a duplicate of this bug. ***
Comment 24 David Edmundson 2011-10-23 09:18:38 UTC
I had a glance at the code for this, as far as I could read it, the font size is selected at being 90% of the cell height, and at no point has any regard for the font metrics of how wide the text is.

IMHO the calendar should not try scaling, simply load the desktop font sizes, then calculate a sizeHint up front which has enough space for everything.
Comment 25 Fredrik Höglund 2011-10-29 18:01:21 UTC
Git commit 15662dc9ab5a118b5194b7da09951555ebb5e5fc by Fredrik Höglund.
Committed on 29/10/2011 at 19:45.
Pushed by fredrik into branch 'master'.

plasma: Fix text overflow in the calendar widget

BUG: 277433
BUG: 281676

M  +51   -13   libs/plasmaclock/calendartable.cpp

http://commits.kde.org/kde-workspace/15662dc9ab5a118b5194b7da09951555ebb5e5fc
Comment 26 Hussam Al-Tayeb 2011-10-29 18:07:15 UTC
Thank you. Will this be fixed in 4.7 branch as well?
Comment 27 Christoph Feck 2011-10-30 11:40:19 UTC
Created attachment 65042 [details]
Too small text

This patch causes the names to be displayed smaller than what I have configured as "Smallest Readable Font". If I cannot read it, it is probably better to not display it at all.
Comment 28 bill p. (aka google01103) 2011-10-30 11:48:36 UTC
Instead of shrinking the font why not just change the number of letters per pay displayed 

either:
Mo Tu We Th Fr Sa Su
or
M T W T F S S
Comment 29 Fredrik Höglund 2011-10-30 21:45:11 UTC
Created attachment 65052 [details]
Make the week day format size-dependent

This patch makes the calendar switch to a narrower format for the week names when the x-height of the font becomes smaller than 5 pixels.
Comment 30 Fredrik Höglund 2011-10-30 21:51:55 UTC
(In reply to comment #26)
> Thank you. Will this be fixed in 4.7 branch as well?

This fix depends on new API in Qt 4.8 to work properly. Qt 4.8 is not released yet and not tested or recommended with KDE 4.7. I can cherry-pick the patch to the branch, but how well it works when you're using Qt 4.7 may unfortunately depend on how the font is hinted.
Comment 31 Fredrik Höglund 2011-10-30 21:58:37 UTC
(In reply to comment #27)
> This patch causes the names to be displayed smaller than what I have configured
> as "Smallest Readable Font". If I cannot read it, it is probably better to not
> display it at all.

(In reply to comment #28)
> Instead of shrinking the font why not just change the number of letters per pay
> displayed 
> 
> either:
> Mo Tu We Th Fr Sa Su
> or
> M T W T F S S

I have attached a new patch that makes the calendar do this when the font becomes too small.

Please test it and let me know what you think.
Comment 32 Hussam Al-Tayeb 2011-10-31 09:25:30 UTC
(In reply to comment #31)
> (In reply to comment #27)
> > This patch causes the names to be displayed smaller than what I have configured
> > as "Smallest Readable Font". If I cannot read it, it is probably better to not
> > display it at all.
> 
> (In reply to comment #28)
> > Instead of shrinking the font why not just change the number of letters per pay
> > displayed 
> > 
> > either:
> > Mo Tu We Th Fr Sa Su
> > or
> > M T W T F S S
> 
> I have attached a new patch that makes the calendar do this when the font
> becomes too small.
> 
> Please test it and let me know what you think.

I just tried this patch. "M T W T F S S" doesn't look very elegant. "Mo Tu We Th Fr Sa Su" might look better.
Comment 33 Fredrik Höglund 2011-10-31 18:03:08 UTC
(In reply to comment #32)
> I just tried this patch. "M T W T F S S" doesn't look very elegant. "Mo Tu We
> Th Fr Sa Su" might look better.

I agree, but KCalendarSystem in kdelibs currently offers three formats translated to other languages; the full name, a three letter abbreviation, and a single letter abbreviation.

KDE 4.8 will be released with kdelibs 4.7, and we generally don't add new API and features in patch releases.

I'm adding the KCalendarSystem maintainer to the CC list in case he has any comments though.
Comment 34 John Layt 2011-11-01 21:33:52 UTC
Date/time formatting standards such as CLDR work with 3 'widths', Long, Short and Narrow, e.g. Monday, Mon and M in English.  Note that different languages/locales may use different number of characters for Short and Narrow, but 3 and 1 is the norm.  The Narrow option was added to kdelibs in 4.7 (?) specifically to solve this bug.

I have no intention to add support for any other formats, especially as 5.0 will be switching to QLocale which will only offer the CLDR standard widths.  If you really must you could provide your own abbreviations and have them translated, but these would be non-standard and not consistent with the rest of KDE and Qt.  Besides, once it gets even smaller then you will just need to switch to 1 char anyway.  I think it would be better to try solve the scaling issue to fit 3 chars in than add all that extra work to save only 1 char.

I haven't checked if this is the case, but when deciding how wide a column must be the code should be checking the max width of all the weekday names displayed to find the widest one, not just the first as it appears to be doing, i.e. Wed is going to be wider than Sun.

FYI, there's a list of various drawing and resizing issues needing to be fixed at http://community.kde.org/Plasma/Tasks#Calendar.2FClock_Plasmoids

Before making any changes I would suggest consulting with aseigo, he has firm opinions on the calendar font dynamic sizing and has rejected patches in the past that wanted to use fixed sizes.  Checking first will save you unnecessary work.
Comment 35 Christoph Feck 2011-11-02 22:58:28 UTC
I didn't know I could resize this calendar, so the issue I raised is probably bogus.
Comment 36 Nick Cross 2011-11-02 23:21:00 UTC
Neither did I :-)  - looks much better now - thanks! 

Although I would argue that it would be nice if it was formatted correctly 'out of the box'
Comment 37 Roman Bysh 2011-12-18 21:57:34 UTC
How can this be marked as resolved/fixed? The problem still exists in 4.7.4
"release 11".

How is it that it was working in openSUSE 11.4 but broken in 12.1?
Comment 38 Anne-Marie Mahfouf 2011-12-19 15:59:56 UTC
Roman, what exactly is broken? The bug was closed as you can resize the calendar. What is the issue you experiment? Please attach a screenshot with default KDE settings to show.
Comment 39 Roman Bysh 2011-12-19 18:19:35 UTC
Created attachment 66905 [details]
Default setting of calendar window shows correct format

Default setting of calendar window in openSUSE 11.4.
Comment 40 Roman Bysh 2011-12-19 18:22:04 UTC
Created attachment 66907 [details]
Default setting of calendar window shows incorrect format in 12.1

Please note that split window causes calendar columns to appear squeezed in.
Comment 41 Roman Bysh 2011-12-19 18:24:50 UTC
Comment on attachment 66907 [details]
Default setting of calendar window shows incorrect format in 12.1

Splitting window gives less real estate to calendar day columns.
Comment 42 Roman Bysh 2011-12-19 18:57:43 UTC
Ann-Marie, this can be fixed by assigned more real estate to the calendar. We have 'way' too much space assigned to the holidays side.

I believe that we should have an option to turn off the holiday side. Or allow the the resizing of the holidays side. 

Any thoughts?
Comment 43 Dhaval Patel 2011-12-19 19:22:08 UTC
I would love to have an options to make that calendar more minimal.

I use KDE because I can make it look clean and simple, but this calendar feels like Windows to me.

http://swipe.nokia.com/img/features/feat-bundle1.jpg is a clean looking calendar. Please make it simpler. If somebody wants to really see other information, they will launch their favorite Scheduling tool.
Comment 44 Anne-Marie Mahfouf 2011-12-19 19:32:32 UTC
Dhaval please do not hijack this report for things that are unrelated. If you have a design for the current calendar, please make a mockup, based on the current one. A phone calendar is not a desktop calendar and this particular calendar is not very readable in my opinion, the fonts are way too small and too spaced.

Roman what is your KDE version? this bug report was closed in regard of KDE 4.8 because this is the current development version and the bug you show is fixed.
Comment 45 Dhaval Patel 2011-12-19 19:38:01 UTC
Apologies Anne-Marie, I was not sure what the appropriate method was to get my opinions heard. I thought it was through these tickets. If you look at comment #9, I posted that link back in early August. Not trying to hujack anything. Just trying to show that it can be cleaner as the posted before me mentioned.

If I do come up with a mockup based on the desktop calendar, where would I upload that to get a discussion around it?
Comment 46 Roman Bysh 2011-12-19 19:46:28 UTC
I am using 4.7.4 "release 11". I wish I could have come in sooner.

IMHO This is a combination of poor font, overall design rendering and insufficient real estate for the calendar.

I've also submitted a bugzilla report from our end.

Are you saying that we will not see anything until January 2012?
Comment 47 tony 2011-12-19 21:31:39 UTC
It seems that font size take into account only height, but it should obey to the minor between both width AND height.
Comment 48 Martin M 2012-03-01 11:05:11 UTC
To me it seems, the the approach here is more "designing for the designers/programmers", but not for the users.

I'd clearly vote for user-definable font face and size options in the settings dialog as it's already possible with the font face of (and only) the clock. I'm running a fresh natty-to-oneiric upgrade with 4.7.4.

I use an SXGA display which is not so ultra-high-definition, and the calender fonts could/should be reduced by half(!) for my taste, me not being blind as a mole and liking more padding rather than less. Taste is different, let the people (me!) choose how they like their calendars.