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
ed990074
Commit
ed990074
authored
Dec 24, 2021
by
Claudio Cambra
Browse files
Change root MultiDayIncidenceDelegate component from Rectangle to Item, as Rectangle is unnecessary
parent
291e2217
Pipeline
#113708
passed with stage
in 4 minutes and 50 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/MultiDayView.qml
View file @
ed990074
...
...
@@ -31,9 +31,6 @@ Item {
property
int
daysToShow
:
daysPerRow
*
6
property
int
daysPerRow
:
7
property
double
weekHeaderWidth
:
Kalendar
.
Config
.
showWeekNumbers
?
Kirigami
.
Units
.
gridUnit
*
1.5
:
0
property
double
dayWidth
:
Kalendar
.
Config
.
showWeekNumbers
?
((
width
-
weekHeaderWidth
)
/
daysPerRow
)
-
spacing
:
// No spacing on right, spacing in between weekheader and monthgrid
(
width
-
weekHeaderWidth
-
(
spacing
*
(
daysPerRow
-
1
)))
/
daysPerRow
// No spacing on left or right of month grid when no week header
property
date
currentDate
// Getting the components once makes this faster when we need them repeatedly
property
int
currentDay
:
currentDate
?
currentDate
.
getDate
()
:
null
...
...
@@ -52,6 +49,9 @@ Item {
//Internal
property
int
numberOfLinesShown
:
0
property
int
numberOfRows
:
(
daysToShow
/
daysPerRow
)
property
double
dayWidth
:
Kalendar
.
Config
.
showWeekNumbers
?
((
width
-
weekHeaderWidth
)
/
daysPerRow
)
-
spacing
:
// No spacing on right, spacing in between weekheader and monthgrid
(
width
-
weekHeaderWidth
-
(
spacing
*
(
daysPerRow
-
1
)))
/
daysPerRow
// No spacing on left or right of month grid when no week header
property
var
dayHeight
:
((
height
-
bgLoader
.
dayLabels
.
height
)
/
numberOfRows
)
-
spacing
property
real
spacing
:
Kalendar
.
Config
.
monthGridBorderWidth
// Between grid squares in background
property
real
listViewSpacing
:
root
.
dayWidth
<
(
Kirigami
.
Units
.
gridUnit
*
5
+
Kirigami
.
Units
.
smallSpacing
*
2
)
?
...
...
src/contents/ui/MultiDayViewIncidenceDelegate.qml
View file @
ed990074
...
...
@@ -10,7 +10,7 @@ import org.kde.kalendar 1.0 as Kalendar
import
"
dateutils.js
"
as
DateUtils
import
"
labelutils.js
"
as
LabelUtils
Rectangle
{
Item
{
id
:
incidenceDelegate
x
:
((
dayWidth
+
parentViewSpacing
)
*
modelData
.
starts
)
+
horizontalSpacing
...
...
@@ -40,12 +40,10 @@ Rectangle {
}
}
radius
:
Kirigami
.
Units
.
smallSpacing
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
property
real
dayWidth
:
0
property
real
parentViewSpacing
:
0
property
int
horizontalSpacing
:
0
// In between incidence spaces
property
real
radius
:
Kirigami
.
Units
.
smallSpacing
property
string
openOccurrenceId
:
""
property
bool
isOpenOccurrence
:
openOccurrenceId
?
openOccurrenceId
===
modelData
.
incidenceId
:
false
...
...
@@ -54,6 +52,7 @@ Rectangle {
modelData
.
endTime
.
getMonth
()
==
root
.
month
||
modelData
.
startTime
.
getMonth
()
==
root
.
month
:
true
property
bool
isDark
:
false
property
alias
mouseArea
:
mouseArea
property
var
incidencePtr
:
modelData
.
incidencePtr
property
date
occurrenceDate
:
modelData
.
startTime
...
...
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