Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
66559a89
Commit
66559a89
authored
Sep 18, 2022
by
Claudio Cambra
Browse files
Fixed more errors in main.qml
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
2fd7c24f
Pipeline
#234115
passed with stage
in 2 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/main.qml
View file @
66559a89
...
...
@@ -501,7 +501,7 @@ Kirigami.ApplicationWindow {
}
}
contextDrawer
:
if
(
incidenceInfoDrawerEnabled
)
incidenceInfoDrawer
contextDrawer
:
incidenceInfoDrawerEnabled
?
incidenceInfoDrawer
:
null
// Drawers inherit from popups too
readonly
property
QQC2.Popup
incidenceInfoViewer
:
incidenceInfoDrawerEnabled
?
incidenceInfoDrawer
:
...
...
@@ -610,7 +610,7 @@ Kirigami.ApplicationWindow {
property
point
incidenceItemPosition
property
point
clickPosition
property
int
incidenceItemMidXPoint
:
incidenceItemPosition
?
property
int
incidenceItemMidXPoint
:
incidenceItemPosition
&&
openingIncidenceItem
?
incidenceItemPosition
.
x
+
openingIncidenceItem
.
width
/
2
:
0
property
bool
positionBelowIncidenceItem
:
incidenceItemPosition
&&
incidenceItemPosition
.
y
<
root
.
pageStack
.
currentItem
.
height
/
2
;
...
...
@@ -642,12 +642,15 @@ Kirigami.ApplicationWindow {
// it is not going further left or right than the left and right edges
// of the current view
return
Math
.
max
(
0
,
Math
.
min
(
incidenceItemMidXPoint
-
width
/
2
,
maxXPosition
));
}
const
itemLeft
=
mapFromItem
(
openingIncidenceItem
,
0
,
0
).
x
;
const
itemRight
=
mapFromItem
(
openingIncidenceItem
,
openingIncidenceItem
.
width
,
0
).
x
;
}
else
if
(
openingIncidenceItem
)
{
const
itemLeft
=
mapFromItem
(
openingIncidenceItem
,
0
,
0
).
x
;
const
itemRight
=
mapFromItem
(
openingIncidenceItem
,
openingIncidenceItem
.
width
,
0
).
x
;
return
Math
.
max
(
itemLeft
,
Math
.
min
(
clickPosition
.
x
,
itemRight
-
width
));
}
return
Math
.
max
(
itemLeft
,
Math
.
min
(
clickPosition
.
x
,
itemRight
-
width
))
;
return
0
;
}
// Make sure not to cover up the incidence item
y
:
positionBelowIncidenceItem
&&
openingIncidenceItem
?
incidenceItemPosition
.
y
+
openingIncidenceItem
.
height
:
incidenceItemPosition
.
y
-
height
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment