Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
Show All 20 Lines | |||||
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | 22 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 24 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
25 | 25 | | |||
26 | Item { | 26 | Item { | ||
27 | id: expandedRepresentation | 27 | id: expandedRepresentation | ||
28 | 28 | | |||
29 | //set width/height to avoid an useless Dialog resize | ||||
davidedmundson: How does this avoid a useless Dialog resize? | |||||
otherwise mainItem starts being sized 0x0, then on Dialog showevent, it searches for its Layout property and resizes it based on that, this makes the resize being a noop which seems a sensible micro optimization mart: otherwise mainItem starts being sized 0x0, then on Dialog showevent, it searches for its Layout… | |||||
30 | width: Layout.minimumWidth | ||||
31 | height: Layout.minimumHeight | ||||
29 | Layout.minimumWidth: units.gridUnit * 24 | 32 | Layout.minimumWidth: units.gridUnit * 24 | ||
30 | Layout.minimumHeight: units.gridUnit * 21 | 33 | Layout.minimumHeight: units.gridUnit * 21 | ||
31 | Layout.preferredWidth: Layout.minimumWidth | 34 | Layout.preferredWidth: Layout.minimumWidth | ||
32 | Layout.preferredHeight: Layout.minimumHeight * 1.5 | 35 | Layout.preferredHeight: Layout.minimumHeight * 1.5 | ||
33 | 36 | | |||
34 | property alias activeApplet: container.activeApplet | 37 | property alias activeApplet: container.activeApplet | ||
35 | property alias hiddenLayout: hiddenItemsView.layout | 38 | property alias hiddenLayout: hiddenItemsView.layout | ||
36 | 39 | | |||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |
How does this avoid a useless Dialog resize?