This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Digital clock (was working fine before - why was it "fixed?)

Tags: None
(comma "," separated)
glupie
Registered Member
Posts
67
Karma
0
OS
One more thing that was completely satisfactory before that I can't tolerate now.

Just upgraded everything.

I don't really understand the version numbering system, but various parts went from 5.23.0 to 5.26.0, from 5.7.5 to 5.8.3, and from 16.04.3 to 16.08.3.

The first thing I noticed after I logged in was that the digital clock in the panel now has a microscopically small font - it was virtually the entire vertical size of the (on the bottom) panel before, but now it only takes up about a third of the panel, and there is a lot of empty (wasted) space. Is there some way of restoring the old font size (without changing the font size in any other location?

Bonus question - a couple of updates ago, I notice that the clock display no longer has the leading zero (all I want is the time in a simple time in hh:mm:ss format - WITH a leading zero if necessary). This is doubly annoying because twice a day I see the width of everything else in the panel charge size to accommodate the change in the amount of horizontal space required to display the time. Is there some way of getting the old behavior (a leading zero) back, as well?
User avatar
Rog131
Registered Member
Posts
828
Karma
10
I solved my clock problems with the 'My Digital Clock': viewtopic.php?f=17&t=134970&p=361132#p361132

Image
glupie
Registered Member
Posts
67
Karma
0
OS
Okay, that solved the second problem (and sorry I didn't see your reply before). Thanks.

I just added a one line patch to plasma-workspace-5.8.3.tar.xz:

Code: Select all
--- plasma-workspace-5.8.3/applets/digital-clock/package/contents/ui/DigitalClock.qml  2016-11-01 12:23:51.000000000 +0000
+++ plasma-workspace-5.8.3/applets/digital-clock/package/contents/ui/DigitalClock.qml  2017-01-01 00:00:00.000000000 +0000
@@ -490,7 +490,7 @@
         var regexp = /(hh*)(.+)(mm)/i
         var match = regexp.exec(timeFormatString);
 
-        var hours = match[1];
+        var hours = "hh";
         var delimiter = match[2];
         var minutes = match[3]
         var seconds = "ss";


Still not clear to me how to increase the font size.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
The bugs are fixed and the code is optimized. Sometimes this will brake some desktops. You could check the bug reports and fill new ones if needed: https://bugs.kde.org

Latest review is: [Digital Clock] Bug fixes and ui code optimization - https://phabricator.kde.org/D3630
Code: Select all
Summary

This patch is meant to improve the Digital Clock applet in the following ways:...



About the font size

With the plasma 5.8.(5) the digital clock font size can be changed from the DigitalClock.qml. With the horizontal panel (name: "horizontalPanel") the targets are timeLabel & dateLabel height.

In this example 'hard coding' the height to 12:

Image
Full image: http://imgur.com/o40Ldzo


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell