Commit 90ea27f4 authored by Diego Gangl's avatar Diego Gangl Committed by Roman Gilg

[Digital Clock] Use a smaller font size in horizontal panel mode

This patch makes the digital clock use a smaller font when used in a
horizontal form factor.


Test Plan: Play with the widget settings in different panels/desktop

Reviewers: #plasma, #vdg, romangg

Reviewed By: #plasma, romangg

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 04bc4772
......@@ -155,7 +155,15 @@ Item {
PropertyChanges {
target: sizehelper
height: Math.min(main.showDate || timezoneLabel.visible ? 0.56 * main.height : main.height, 3 * theme.defaultFont.pixelSize)
* The value 0.71 was picked by testing to give the clock the right
* size (aligned with tray icons).
* Value 0.56 seems to be chosen rather arbitrary as well such that
* the time label is slightly larger than the date or timezone label
* and still fits well into the panel with all the applied margins.
height: Math.min(main.showDate || timezoneLabel.visible ? main.height * 0.56 : main.height * 0.71,
3 * theme.defaultFont.pixelSize)
font.pixelSize: sizehelper.height
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment