[PlasmaComponents Menu] Add maximumWidth property
ClosedPublic

Authored by broulik on Jan 23 2017, 10:10 PM.

Details

Summary

This allows to limit the maximum width of a menu. It can be useful for instance in task manager where long file names for recent documents will result in gigantic menus.

The property has a RESET method (which is called if you assign "undefined") which will set it back to QWIDGETSIZE_MAX to remove the size restriction.

Test Plan

Comes with a manual test. The menu itself is still placed as though it occupied the full width. :(

Hugo, any idea what's up with Breeze theme not eliding the menu items? This is with both device pixel ratio 1 (plasmashell) and 2 (in the screenshot). I recall there being some Qt recently having been fixed but I'm not sure, might as well be a Breeze bug, though it also happens with Fusion.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 10470.Jan 23 2017, 10:10 PM
broulik retitled this revision from to [PlasmaComponents Menu] Add maximumWidth property.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, hpereiradacosta.
broulik set the repository for this revision to R242 Plasma Framework (Library).
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 23 2017, 10:10 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jan 23 2017, 10:56 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Jan 23 2017, 10:56 PM
This revision was automatically updated to reflect the committed changes.