[Applet]Fix dimensions of traffic Monitor
Needs ReviewPublic

Authored by gvgeo on Fri, Feb 14, 6:29 AM.

Details

Reviewers
jgrulich
Group Reviewers
Plasma
VDG
Summary

Remove top margin.
Workaround to get paintedheight for label. (Undefined or paintedheight
does not work.)
Base plotter's top margin on labels size.
Add small spacing at the bottom.
Add 0 value.
Align labels to the right.

Test Plan

Before


After

Diff Detail

Repository
R116 Plasma Network Management Applet
Branch
monitor (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22532
Build 22550: arc lint + arc unit
gvgeo created this revision.Fri, Feb 14, 6:29 AM
Restricted Application added a project: Plasma. · View Herald TranscriptFri, Feb 14, 6:29 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gvgeo requested review of this revision.Fri, Feb 14, 6:29 AM
gvgeo edited the test plan for this revision. (Show Details)Fri, Feb 14, 6:36 AM
gvgeo edited the test plan for this revision. (Show Details)
gvgeo edited the summary of this revision. (Show Details)
broulik added inline comments.
applet/contents/ui/TrafficMonitor.qml
42–43

Always Math.round when you doing random fractions of sizes

46

You can set it to undefiend to reset the height

64

Ideally we didn't randomly divide random sizes

gvgeo updated this revision to Diff 75670.EditedFri, Feb 14, 10:44 AM
gvgeo edited the summary of this revision. (Show Details)

Changes:
Added O value and aligned to the right.
Used Math.round
Made the plot's topMargin more specific. (Need to alling lines with labels)
Made comment more clear.

About the label workaround:
It is the complete opposite problem of PlasmaComponents checkboxes, where label cannot take implicitHeight.
Here it always takes implicitHeight with undefined or paintedheight.

gvgeo updated this revision to Diff 75770.EditedSun, Feb 16, 2:53 PM
gvgeo marked 3 inline comments as done.

Remove double space.

ngraham added inline comments.
applet/contents/ui/TrafficMonitor.qml
64

We could probably just use a smaller predefined unit, like largeSpacing, instead of coming up with a semi-random-looking value derived from the label height