Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/views/Panel.qml
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 91 | value: { | |||
---|---|---|---|---|---|
92 | if (!containment) { | 92 | if (!containment) { | ||
93 | return; | 93 | return; | ||
94 | } | 94 | } | ||
95 | 95 | | |||
96 | return containment.backgroundHints; | 96 | return containment.backgroundHints; | ||
97 | } | 97 | } | ||
98 | } | 98 | } | ||
99 | 99 | | |||
100 | Item { | 100 | MouseArea { | ||
101 | id: containmentParent | 101 | id: containmentParent | ||
102 | | ||||
103 | onPressAndHold: { | ||||
104 | containment.showContextMenu(Qt.point(mouse.x, mouse.y), "RightButton;NoModifier") | ||||
105 | } | ||||
106 | | ||||
102 | anchors { | 107 | anchors { | ||
103 | fill: parent | 108 | fill: parent | ||
104 | 109 | | |||
105 | //Margins are either the size of the margins in the SVG, unless that prevents the panel from being at least half a smallMedium icon + smallSpace) tall at which point we set the margin to whatever allows it to be that...or if it still won't fit, 1. | 110 | //Margins are either the size of the margins in the SVG, unless that prevents the panel from being at least half a smallMedium icon + smallSpace) tall at which point we set the margin to whatever allows it to be that...or if it still won't fit, 1. | ||
106 | 111 | | |||
107 | //the size a margin should be to force a panel to be the required size above | 112 | //the size a margin should be to force a panel to be the required size above | ||
108 | readonly property real spacingAtMinSize: Math.max(1, (verticalPanel ? root.width : root.height) - units.iconSizes.smallMedium - units.smallSpacing*2)/2 | 113 | readonly property real spacingAtMinSize: Math.max(1, (verticalPanel ? root.width : root.height) - units.iconSizes.smallMedium - units.smallSpacing*2)/2 | ||
109 | 114 | | |||
Show All 9 Lines |