Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/global/Globals.qml
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 133 | case NotificationManager.Settings.BottomRight: | |||
---|---|---|---|---|---|
134 | return Qt.AlignBottom | Qt.AlignRight; | 134 | return Qt.AlignBottom | Qt.AlignRight; | ||
135 | } | 135 | } | ||
136 | } | 136 | } | ||
137 | 137 | | |||
138 | readonly property QtObject focusDialog: plasmoid.nativeInterface.focussedPlasmaDialog | 138 | readonly property QtObject focusDialog: plasmoid.nativeInterface.focussedPlasmaDialog | ||
139 | onFocusDialogChanged: positionPopups() | 139 | onFocusDialogChanged: positionPopups() | ||
140 | 140 | | |||
141 | // The raw width of the popup's content item, the Dialog itself adds some margins | 141 | // The raw width of the popup's content item, the Dialog itself adds some margins | ||
142 | property int popupWidth: units.gridUnit * 18 | 142 | // Make it wider when on the top or the bottom center, since there's more horizontal | ||
143 | // space available without looking weird | ||||
144 | property int popupWidth: popupLocation & Qt.AlignHCenter ? units.gridUnit * 28 : units.gridUnit * 18 | ||||
143 | property int popupEdgeDistance: units.largeSpacing * 2 | 145 | property int popupEdgeDistance: units.largeSpacing * 2 | ||
144 | property int popupSpacing: units.largeSpacing | 146 | // Reduce spacing between popups when centered so the stack doesn't intrude into the | ||
147 | // view as much | ||||
148 | property int popupSpacing: popupLocation & Qt.AlignHCenter ? units.smallSpacing : units.largeSpacing | ||||
145 | 149 | | |||
146 | // How much vertical screen real estate the notification popups may consume | 150 | // How much vertical screen real estate the notification popups may consume | ||
147 | readonly property real popupMaximumScreenFill: 0.75 | 151 | readonly property real popupMaximumScreenFill: 0.75 | ||
148 | 152 | | |||
149 | onPopupLocationChanged: Qt.callLater(positionPopups) | 153 | onPopupLocationChanged: Qt.callLater(positionPopups) | ||
150 | 154 | | |||
151 | Component.onCompleted: checkInhibition() | 155 | Component.onCompleted: checkInhibition() | ||
152 | 156 | | |||
▲ Show 20 Lines • Show All 438 Lines • Show Last 20 Lines |