fix double spacing bug
ClosedPublic

Authored by zzag on Feb 16 2018, 2:47 PM.

Details

Summary

When a menu doesn't have any icons, space between check boxes and
text is twice as big as it should be.

Before

After

Test Plan
  • open menu which has at least one checkbox and doesn't have any icons

Diff Detail

Repository
R31 Breeze
Branch
double-space-bug
Lint
No Linters Available
Unit
No Unit Test Coverage
zzag created this revision.Feb 16 2018, 2:47 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 16 2018, 2:47 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
zzag requested review of this revision.Feb 16 2018, 2:47 PM
zzag edited the summary of this revision. (Show Details)Feb 16 2018, 2:48 PM

Thanks for the patch.
I "think" one must also do a similar fix in "Style::menuItemSizeFromContents".
It seems to me that there also the line 2728
leftColumnWidth += Metrics::MenuItem_ItemSpacing;
should also be conditionned with "if iconWidth > 0"
Can you double check ?

zzag updated this revision to Diff 27367.Feb 16 2018, 5:29 PM

add icon width to the contents size only if there is an icon

hpereiradacosta accepted this revision.Feb 17 2018, 8:36 AM

Ship it !
Thanks for this patch, and sorry for the mess on the Blur patch (should have used arc).

This revision is now accepted and ready to land.Feb 17 2018, 8:36 AM
This revision was automatically updated to reflect the committed changes.