Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
46dbd6e8
Commit
46dbd6e8
authored
Jan 06, 2021
by
Volker Krause
Browse files
Also show open-end time intervals
Support for this has recently been added to KOpeningHours.
parent
80554e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/IndoorMapInfoSheetOpeningHoursDelegate.qml
View file @
46dbd6e8
...
...
@@ -60,19 +60,26 @@ Column {
Rectangle
{
id
:
intervalBox
property
var
interval
:
modelData
property
var
closeColor
:
Kirigami
.
Theme
.
negativeBackgroundColor
;
color
:
{
switch
(
interval
.
state
)
{
case
Interval
.
Open
:
return
Kirigami
.
Theme
.
positiveBackgroundColor
;
case
Interval
.
Closed
:
return
Kirigami
.
Theme
.
negativeBackground
Color
;
case
Interval
.
Closed
:
return
intervalBox
.
close
Color
;
case
Interval
.
Unknown
:
return
Kirigami
.
Theme
.
neutralBackgroundColor
;
}
return
"
transparent
"
;
}
width
:
{
var
ratio
=
(
interval
.
end
-
interval
.
begin
)
/
(
24
*
60
*
60
*
1000
);
var
ratio
=
(
interval
.
e
stimatedE
nd
-
interval
.
begin
)
/
(
24
*
60
*
60
*
1000
);
return
ratio
*
(
delegateRoot
.
ListView
.
view
.
width
-
delegateRoot
.
ListView
.
view
.
labelWidth
-
Kirigami
.
Units
.
smallSpacing
);
}
height
:
Kirigami
.
Units
.
gridUnit
gradient
:
Gradient
{
orientation
:
Gradient
.
Horizontal
GradientStop
{
position
:
0.0
;
color
:
intervalBox
.
color
}
GradientStop
{
position
:
(
interval
.
end
-
interval
.
begin
)
/
(
interval
.
estimatedEnd
-
interval
.
begin
);
color
:
intervalBox
.
color
}
GradientStop
{
position
:
1.0
;
color
:
interval
.
hasOpenEndTime
?
intervalBox
.
closeColor
:
intervalBox
.
color
}
}
QQC2.Label
{
id
:
commentLabel
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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