Add MenuSeparator
ClosedPublic

Authored by astippich on Jun 22 2019, 6:49 PM.

Details

Summary

Make the MenuSeparator span the full width of the menu
like in QWidget-based menus

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich created this revision.Jun 22 2019, 6:49 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 22 2019, 6:49 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
astippich requested review of this revision.Jun 22 2019, 6:49 PM

Related to D21944
Menu now looks like

before:

ngraham added inline comments.Jun 22 2019, 11:21 PM
org.kde.desktop/MenuSeparator.qml
38

@mart does this need to be multiplied by the device pixel ratio to account for fractional scale factors? I forget.

filipf added a subscriber: filipf.Jun 23 2019, 12:24 AM

In the after picture I'm noticing that the separator is 1px outside the frame when the menus is over a dark bg.

apol added inline comments.Jun 23 2019, 9:30 AM
org.kde.desktop/MenuSeparator.qml
38

It shouldn't need any height at all.

ngraham accepted this revision.Jun 23 2019, 9:33 AM
ngraham added inline comments.
org.kde.desktop/MenuSeparator.qml
38

Oh duh, I was thinking it was a Rectangle, but it's a Kirigami.Separator

This revision is now accepted and ready to land.Jun 23 2019, 9:33 AM
astippich updated this revision to Diff 60433.Jun 23 2019, 10:21 AM
  • remove unneeded height
apol accepted this revision.Jun 23 2019, 11:23 AM

LGTM

To be honest, I would expect this to be the actual logic and Kirigami.Separator just use MenuSeparator, but maybe it's something we can look into in the future.

This revision was automatically updated to reflect the committed changes.