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
e4d9c137
Commit
e4d9c137
authored
Nov 10, 2021
by
Claudio Cambra
Browse files
Increased minimum height of incidences in week view
parent
ee87d0cf
Pipeline
#96171
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/hourlyincidencemodel.cpp
View file @
e4d9c137
...
...
@@ -174,8 +174,8 @@ QVariantList HourlyIncidenceModel::layoutLines(const QDateTime &rowStart) const
:
rowEnd
;
// Need to convert ints into doubles to get more accurate starting positions
const
auto
start
=
((
startDT
.
time
().
hour
()
*
1.0
)
*
(
60.0
/
mPeriodLength
))
+
((
startDT
.
time
().
minute
()
*
1.0
)
/
mPeriodLength
);
const
auto
duration
=
qMax
(
getDuration
(
startDT
,
idx
.
data
(
IncidenceOccurrenceModel
::
EndTime
).
toDateTime
().
toTimeZone
(
QTimeZone
::
systemTimeZone
()),
mPeriodLength
),
1.0
);
const
auto
duration
=
// Give a minimum acceptable height or otherwise have unclickable incidence
qMax
(
getDuration
(
startDT
,
idx
.
data
(
IncidenceOccurrenceModel
::
EndTime
).
toDateTime
().
toTimeZone
(
QTimeZone
::
systemTimeZone
()),
mPeriodLength
),
2.5
);
const
auto
startMinutesFromDayStart
=
(
startDT
.
time
().
hour
()
*
60
)
+
startDT
.
time
().
minute
();
const
auto
endMinutesFromDayStart
=
qMin
((
endDT
.
time
().
hour
()
*
60
)
+
endDT
.
time
().
minute
(),
24
*
60
*
60
);
...
...
Claudio Cambra
@clau-cambra
mentioned in issue
#60 (closed)
·
Nov 10, 2021
mentioned in issue
#60 (closed)
mentioned in issue #60
Toggle commit list
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