[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-workspace] applets/digital-clock/package/contents/ui: Fix clock in vertical panel
From: David Edmundson <kde () davidedmundson ! co ! uk>
Date: 2016-09-03 9:22:32
Message-ID: E1bg79k-0004Dy-Qt () code ! kde ! org
[Download RAW message or body]
Git commit 0ba2345baa72d81567f785afdfd071b4cff6b5db by David Edmundson.
Committed on 03/09/2016 at 09:22.
Pushed by davidedmundson into branch 'master'.
Fix clock in vertical panel
Summary:
The clock in the vertical panel can't fit, it won't word wrap as the
clock is only one word long - so it needs to have a horizontalFit size
mode (without a minimum size) so that the text always fits without being
clipped.
This brings the vertical state in line with the horizontalSmall state
which also sets a minimumPointSize of 0.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2644
M +7 -5 applets/digital-clock/package/contents/ui/DigitalClock.qml
http://commits.kde.org/plasma-workspace/0ba2345baa72d81567f785afdfd071b4cff=
6b5db
diff --git a/applets/digital-clock/package/contents/ui/DigitalClock.qml b/a=
pplets/digital-clock/package/contents/ui/DigitalClock.qml
index 48a3100..159eadf 100644
--- a/applets/digital-clock/package/contents/ui/DigitalClock.qml
+++ b/applets/digital-clock/package/contents/ui/DigitalClock.qml
@@ -216,9 +216,9 @@ Item {
=
height: sizehelper.height
width: sizehelper.width
+ minimumPointSize: 0
=
- fontSizeMode: Text.VerticalFit
- wrapMode: Text.WordWrap
+ fontSizeMode: Text.HorizontalFit
}
=
PropertyChanges {
@@ -227,8 +227,8 @@ Item {
height: Math.max(sizehelper.lineCount > 1 ? 2 * Math.roun=
d(timeLabel.height / 6) : 2 * Math.round(timeLabel.height / 3), theme.small=
estFont.pixelSize)
width: main.width
=
- fontSizeMode: Text.VerticalFit
- minimumPixelSize: theme.smallestFont.pixelSize
+ fontSizeMode: Text.HorizontalFit
+ minimumPointSize: 0
elide: Text.ElideRight
}
=
@@ -239,7 +239,7 @@ Item {
width: timezoneLabel.width
=
fontSizeMode: Text.HorizontalFit
- minimumPixelSize: theme.smallestFont.pixelSize
+ minimumPointSize: 0
elide: Text.ElideRight
}
=
@@ -249,6 +249,8 @@ Item {
height: sizehelper.paintedHeight
width: main.width
=
+ minimumPointSize: 0
+
fontSizeMode: Text.HorizontalFit
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic