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
a82927cb
Commit
a82927cb
authored
Oct 08, 2022
by
Claudio Cambra
Browse files
Add week view mode to config
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
a9012d63
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/MainViews/HourlyView.qml
View file @
a82927cb
...
...
@@ -27,7 +27,15 @@ Kirigami.Page {
property
int
daysToShow
:
7
property
bool
dragDropEnabled
:
true
readonly
property
var
internalHourlyView
:
basicViewLoader
.
item
readonly
property
var
internalHourlyView
:
{
switch
(
Kalendar
.
Config
.
hourlyViewMode
)
{
case
Kalendar
.
Config
.
BasicInternalHourlyView
:
return
basicViewLoader
.
item
;
case
Kalendar
.
Config
.
SwipeableInternalHourlyView
:
default
:
return
swipeableViewLoader
.
item
;
}
}
readonly
property
var
mode
:
switch
(
daysToShow
)
{
case
1
:
...
...
@@ -83,7 +91,7 @@ Kirigami.Page {
Loader
{
id
:
swipeableViewLoader
anchors.fill
:
parent
active
:
false
active
:
Kalendar
.
Config
.
hourlyViewMode
===
Kalendar
.
Config
.
SwipeableInternalHourlyView
sourceComponent
:
SwipeableInternalHourlyView
{
anchors.fill
:
parent
...
...
@@ -100,7 +108,7 @@ Kirigami.Page {
Loader
{
id
:
basicViewLoader
anchors.fill
:
parent
active
:
true
active
:
Kalendar
.
Config
.
hourlyViewMode
===
Kalendar
.
Config
.
BasicInternalHourlyView
sourceComponent
:
BasicInternalHourlyView
{
anchors.fill
:
parent
...
...
src/contents/ui/Settings/ViewSettingsPage.qml
View file @
a82927cb
...
...
@@ -216,6 +216,51 @@ Kirigami.ScrollablePage {
}
}
MobileForm.FormCard
{
Layout.fillWidth
:
true
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
contentItem
:
ColumnLayout
{
spacing
:
0
MobileForm.FormCardHeader
{
title
:
i18n
(
"
Week view settings
"
)
}
Controls.ButtonGroup
{
id
:
hourlyViewModeGroup
exclusive
:
true
onCheckedButtonChanged
:
{
Config
.
hourlyViewMode
=
checkedButton
.
value
;
Config
.
save
();
}
}
MobileForm.FormSectionText
{
text
:
i18n
(
"
Week view mode
"
)
}
ColumnLayout
{
spacing
:
0
Layout.fillWidth
:
true
MobileForm.FormRadioDelegate
{
property
int
value
:
Config
.
SwipeableInternalHourlyView
text
:
i18n
(
"
Swipeable week view
"
)
enabled
:
!
Config
.
isHourlyViewModeImmutable
checked
:
Config
.
monthGridMode
===
value
Controls.ButtonGroup.group
:
hourlyViewModeGroup
}
MobileForm.FormRadioDelegate
{
property
int
value
:
Config
.
BasicInternalHourlyView
text
:
i18n
(
"
Basic week view
"
)
enabled
:
!
Config
.
isHourlyViewModeImmutable
checked
:
Config
.
monthGridMode
===
value
Controls.ButtonGroup.group
:
hourlyViewModeGroup
}
MobileForm.FormTextDelegate
{
text
:
i18n
(
"
Swipeable week view requires higher system performance.
"
)
visible
:
Config
.
hourlyViewMode
===
Config
.
SwipeableInternalHourlyView
}
}
}
}
MobileForm.FormCard
{
Layout.fillWidth
:
true
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
...
...
src/kalendarconfig.kcfg
View file @
a82927cb
...
...
@@ -149,6 +149,19 @@ SPDX-License-Identifier: LGPL-2.0-or-later
</group>
<group
name=
"WeekView"
>
<entry
name=
"hourlyViewMode"
type=
"Enum"
>
<label>
Type of day grid view to be used internally in the month view"
</label>
<choices>
<choice
name=
"SwipeableInternalHourlyView"
>
<label>
Swipeable internal week view
</label>
</choice>
<choice
name=
"BasicInternalHourlyView"
>
<label>
Basic internal week view
</label>
</choice>
</choices>
<default>
SwipeableMonthGrid
</default>
</entry>
<entry
name=
"weekViewAllDayHeaderHeight"
type=
"Int"
>
<label>
Set the height of the all-day header at the top of the week view."
</label>
<default>
-1
</default>
...
...
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