Commit 51558887 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fix some bugs with incidence viewers active state and loading



Signed-off-by: Claudio Cambra's avatarClaudio Cambra <claudio.cambra@gmail.com>
parent 83ceee68
Pipeline #236395 passed with stage
in 1 minute and 58 seconds
......@@ -503,12 +503,11 @@ Kirigami.ApplicationWindow {
contextDrawer: incidenceInfoDrawerEnabled ? incidenceInfoDrawer : null
// Drawers inherit from popups too
readonly property QQC2.Popup incidenceInfoViewer: incidenceInfoDrawerEnabled ? incidenceInfoDrawer :
readonly property var incidenceInfoViewer: incidenceInfoDrawerEnabled ? incidenceInfoDrawer :
incidenceInfoPopupEnabled ? incidenceInfoPopup :
null
property bool incidenceInfoDrawerEnabled: Kirigami.Settings.isMobile
property bool incidenceInfoDrawerEnabled: Kirigami.Settings.isMobile || !Config.useIncidenceInfoPopup
readonly property alias incidenceInfoDrawer: incidenceInfoDrawerLoader.item
Loader {
id: incidenceInfoDrawerLoader
......@@ -528,14 +527,13 @@ Kirigami.ApplicationWindow {
interactive: Kirigami.Settings.isMobile // Otherwise get weird bug where drawer gets dragged around despite no click
onIncidenceDataChanged: root.openOccurrence = incidenceData;
onVisibleChanged: visible ?
root.openOccurrence = incidenceData : root.openOccurrence = null
onVisibleChanged: visible ? root.openOccurrence = incidenceData : root.openOccurrence = null
readonly property int minWidth: Kirigami.Units.gridUnit * 15
readonly property int maxWidth: Kirigami.Units.gridUnit * 25
readonly property int defaultWidth: Kirigami.Units.gridUnit * 20
property int actualWidth: {
if (Config.incidenceInfoDrawerDrawerWidth === -1) {
if (Config.incidenceInfoDrawerDrawerWidth && Config.incidenceInfoDrawerDrawerWidth === -1) {
return defaultWidth;
} else {
return Config.incidenceInfoDrawerDrawerWidth;
......@@ -572,7 +570,7 @@ Kirigami.ApplicationWindow {
}
}
property bool incidenceInfoPopupEnabled: !Kirigami.Settings.isMobile
property bool incidenceInfoPopupEnabled: !Kirigami.Settings.isMobile && Config.useIncidenceInfoPopup
readonly property alias incidenceInfoPopup: incidenceInfoPopupLoader.item
Loader {
id: incidenceInfoPopupLoader
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment