[PanelView] Emit availableScreenRegionChanged in resizeEvent, not when setting a new length
ClosedPublic

Authored by broulik on Feb 12 2017, 10:17 PM.

Details

Summary

The panel length might not actually change depending on minimum and maximum size constraints and this is the wrong place to do this in the first place.

Test Plan

While messing with the dekstop containment layouting mechanism I found that it would re-layout sometimes without obvious reason; closing some applet popups (e.g. kickoff) would cause a re-evaluation of the preferredWidth of the panel which eventually would end up calling setLength with a slightly different size causing us to emit this signal.

Resized a panel, stuff on desktop automatically re-layouted.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik updated this revision to Diff 11264.Feb 12 2017, 10:17 PM
broulik retitled this revision from to [PanelView] Don't emit availableScreenRegionChanged just because we set a new length.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 12 2017, 10:17 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Old code is wrong, new code is also wrong.

length is the implicitWidth/height of the contents, it is /not/ the size of the panel.

The only place for this signal is the geometryChanged event.

mart added a subscriber: mart.Feb 13 2017, 12:21 PM

agree with David

broulik updated this revision to Diff 11285.Feb 13 2017, 12:29 PM
broulik retitled this revision from [PanelView] Don't emit availableScreenRegionChanged just because we set a new length to [PanelView] Emit availableScreenRegionChanged in resizeEvent, not when setting a new length.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
  • Emit signal from resizeEvent of panelview
mart accepted this revision.Feb 14 2017, 2:02 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Feb 14 2017, 2:02 PM
This revision was automatically updated to reflect the committed changes.