[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: {F7772047} After, default horizontal panel: {F7772044} Before: double-height horizontal panel: {F7772046} After, double-height horizontal panel: {F7772045} Before, absurdly humongous horizontal panel: {F7772048} After, absurdely humongous horizontal panel: {F7772049} Reviewers: #vdg, #plasma, spstarr Reviewed By: #plasma, spstarr Subscribers: spstarr, filipf, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D25413
parent
e8402b9a
Please register or sign in to comment