[Weather] Make compact representation temperature text match size of clock text

Authored by ngraham on Nov 19 2019, 7:45 PM.

Description

[Weather] Make compact representation temperature text match size of clock text

Summary:
Right now, the Weather widget's compact representation's temperature text is not the same
size as the text for the clock, which looks especially awkward when both are placed
adjacent to one another. In addition, the text size has no upper bound, so it can become
absolutely gigantic with a tall panel.

This patch fixes both issues by using the same size logic used in the digital clock,
ensuring that the text sizes are identical.

I know that this uses a magic value, and that this is bad and I should feel bad.
However it's the same one used in the digital clock. Once more than one widget is using
this "height * 0.7" value, it becomes feasible to factor it out into something in
plasma-framework maybe so we can use it to get consistent text size everywhere.

Hopefully that can be material for a subsequent patch though.

Test Plan:
No change for vertical panels.

Before, default horizontal panel:

After, default horizontal panel:

Before: double-height horizontal panel:

After, double-height horizontal panel:

Before, absurdly humongous horizontal panel:

After, absurdely humongous horizontal panel:

Reviewers: VDG, Plasma, spstarr

Reviewed By: Plasma, spstarr

Subscribers: spstarr, filipf, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D25413