[Panel] Reduce duplicate enabled borders calculation
ClosedPublic

Authored by broulik on Jun 3 2016, 10:50 AM.

Details

Summary

Instead of calculating them over and over again in response to various geometry change events, just use the newly introduced property.

Test Plan

Requires D1756

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik updated this revision to Diff 4189.Jun 3 2016, 10:50 AM
broulik retitled this revision from to [Panel] Reduce duplicate enabled borders calculation.
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 R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 3 2016, 10:50 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added inline comments.Jun 3 2016, 10:50 AM
desktoppackage/contents/views/Panel.qml
29 ↗(On Diff #4189)

Dunno if we still need this, ie. if we need a way to signal this back to cpp

32 ↗(On Diff #4189)

Needs to check for containment being null or else prints warning

davidedmundson accepted this revision.Jun 6 2016, 8:24 AM
davidedmundson added a reviewer: davidedmundson.
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
desktoppackage/contents/views/Panel.qml
29 ↗(On Diff #4189)

In PanelView::themeChanged

call positionPanel()
Will acheive the same thing.

and then we can get rid of this.

This revision is now accepted and ready to land.Jun 6 2016, 8:24 AM
mart added a subscriber: mart.Jun 6 2016, 8:25 AM

I don't understand what the patch is supposed to be doing.. the enabled bprders of the svg can be calculated only based on the location of the panel, that has been completely removed

desktoppackage/contents/views/Panel.qml
29 ↗(On Diff #4189)

this is used on themes that have different svgs for different panel locations ( default ones don't anymore)

should be found some obscure theme on kdelook that uses this feature (i can see an use for it, don't think it can be removed to force only one background per theme)

32 ↗(On Diff #4189)

there is no enabledborders property in containment? (neither i want such a property, is not the right place)

mart requested changes to this revision.Jun 6 2016, 8:26 AM
mart added a reviewer: mart.
This revision now requires changes to proceed.Jun 6 2016, 8:26 AM
mart added inline comments.Jun 6 2016, 8:27 AM
desktoppackage/contents/views/Panel.qml
32 ↗(On Diff #4189)

perhaps as a property of the view could work

broulik added inline comments.Jun 6 2016, 8:45 AM
desktoppackage/contents/views/Panel.qml
32 ↗(On Diff #4189)

Ah yeah, it's not on containment, I put it on panel. yay for testing my patches :D

broulik updated this revision to Diff 4233.Jun 6 2016, 11:02 AM
broulik edited edge metadata.
  • It's panel.enabledBorders, not containment
  • Remove onPrefixChanged handler
mart added inline comments.Jun 7 2016, 11:51 AM
desktoppackage/contents/views/Panel.qml
29 ↗(On Diff #4189)

ok

mart accepted this revision.Jun 13 2016, 8:23 AM
mart edited edge metadata.
This revision is now accepted and ready to land.Jun 13 2016, 8:23 AM
This revision was automatically updated to reflect the committed changes.