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
567b4263
Commit
567b4263
authored
Dec 09, 2021
by
Claudio Cambra
Browse files
Fixed 'Today' button in the hourly views. Fixes
#132
parent
fccdb16a
Pipeline
#107261
passed with stage
in 6 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/HourlyView.qml
View file @
567b4263
...
...
@@ -69,7 +69,7 @@ Kirigami.Page {
if
(
root
.
daysToShow
%
7
===
0
)
{
date
=
DateUtils
.
getFirstDayOfWeek
(
date
);
}
const
weekDiff
=
Math
.
round
((
date
.
getTime
()
-
pathView
.
currentItem
.
startDate
.
getTime
())
/
(
root
.
daysToShow
*
24
*
60
*
60
*
1000
));
const
weekDiff
=
Math
.
floor
((
date
.
getTime
()
-
pathView
.
currentItem
.
startDate
.
getTime
())
/
(
root
.
daysToShow
*
24
*
60
*
60
*
1000
));
let
position
=
pathView
.
currentItem
.
item
.
hourScrollView
.
getCurrentPosition
();
let
newIndex
=
pathView
.
currentIndex
+
weekDiff
;
...
...
@@ -116,7 +116,7 @@ Kirigami.Page {
}
readonly
property
Kirigami.Action
todayAction
:
Kirigami.Action
{
icon.name
:
"
go-jump-today
"
text
:
i18n
(
"
Today
"
)
text
:
i18n
(
"
Now
"
)
onTriggered
:
setToDate
(
new
Date
(),
true
);
}
...
...
src/contents/ui/main.qml
View file @
567b4263
...
...
@@ -989,9 +989,9 @@ Kirigami.ApplicationWindow {
}
function
openDayLayer
(
selectedDate
)
{
if
(
!
isNaN
(
selectedDate
.
getTime
()))
{
dayScaleModelLoader
.
active
=
true
;
dayScaleModelLoader
.
active
=
true
;
if
(
!
isNaN
(
selectedDate
.
getTime
()))
{
root
.
selectedDate
=
selectedDate
;
if
(
Kirigami
.
Settings
.
isMobile
)
{
...
...
@@ -1008,7 +1008,7 @@ Kirigami.ApplicationWindow {
view
.
QQC2
.
StackView
.
removed
.
connect
(
function
()
{
pageStack
.
currentItem
.
header
=
filterHeader
.
item
;
});
}
pageStack
.
layers
.
currentItem
.
setToDate
(
root
.
selectedDate
,
true
);
view
.
setToDate
(
root
.
selectedDate
,
true
);
}
}
}
...
...
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