Review Request 127393: digital-clock: Fix font size of date label in small panels

Martin Klapetek martin.klapetek at gmail.com
Wed Mar 16 18:19:56 GMT 2016



> On March 16, 2016, 6:19 p.m., Martin Klapetek wrote:
> > applets/digital-clock/package/contents/ui/DigitalClock.qml, line 400
> > <https://git.reviewboard.kde.org/r/127393/diff/1/?file=453347#file453347line400>
> >
> >     Have you tried dateLabelLeft.paintedHeight?
> 
> Daniel Faust wrote:
>     I think that would be the same as dateLabelLeft.height, but the separator is meant to have the same height as the font, not the label.
>     I would need something like "paintedFontPixelSize".
>     Alternatively I could calculate the font.pixelSize as a percentage of the label height and use that as a scaling factor.
> 
> Martin Klapetek wrote:
>     > I think that would be the same as dateLabelLeft.height ... I would need something like "paintedFontPixelSize".
>     
>     paintedHeight is the actual height that the painted text has in pixels.
> 
> Daniel Faust wrote:
>     I had a second look at your screen shot, I thought that the separator had the exact height as the rendered text, but it really has the height of the label.
>     After my changes I thought that the separator was too high, so I scaled it down to 70%. But it seems that leaving it at 100% is like it was before.
>     Since it seems too complicated to calculate the rendered text height, leaving it at 100% height might be the better choice.

> Since it seems too complicated to calculate the rendered text height

That's exactly what .paintedHeight property is for. Just try it.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127393/#review93609
-----------------------------------------------------------


On March 16, 2016, 4:53 p.m., Daniel Faust wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127393/
> -----------------------------------------------------------
> 
> (Updated March 16, 2016, 4:53 p.m.)
> 
> 
> Review request for kde-workspace.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> Currently the digital clock applet uses a fixed font size for the date label when it's placed in a narrow horizontal panel.
> Example: http://paste.opensuse.org/view/raw/f8ba5d0d
> 
> With this patch the same font size is used as for the time label.
> 
> As mentioned at https://git.reviewboard.kde.org/r/127102/ I'm not sure if the current design is a bug or intentional.
> On the one hand having a smaller font size reduces the width of the applet, on the other hand having the same font size is more consistent.
> I would prefer a consistent look however.
> 
> This patch creates one problem though. Currently the height of the date-time-separator is set to the height of the (fixed) date label font size.
> With this patch I set the separator height to 70% of the applet height.
> 
> 
> Diffs
> -----
> 
>   applets/digital-clock/package/contents/ui/DigitalClock.qml 95bb071 
> 
> Diff: https://git.reviewboard.kde.org/r/127393/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Daniel Faust
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20160316/f4fee81d/attachment.htm>


More information about the kde-core-devel mailing list