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
48b4cd9f
Commit
48b4cd9f
authored
Oct 08, 2022
by
Claudio Cambra
Browse files
Add month grid mode to config
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
0c1a88ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/MainViews/MonthView.qml
View file @
48b4cd9f
...
...
@@ -27,7 +27,15 @@ Kirigami.Page {
property
bool
dragDropEnabled
:
true
property
alias
dayGrid
:
swipeableViewLoader
.
item
readonly
property
var
dayGrid
:
{
switch
(
Kalendar
.
Config
.
monthGridMode
)
{
case
Kalendar
.
Config
.
BasicMonthGrid
:
return
basicViewLoader
.
item
;
case
Kalendar
.
Config
.
SwipeableMonthGrid
:
default
:
return
swipeableViewLoader
.
item
;
}
}
function
setToDate
(
date
,
isInitialMonth
=
false
)
{
dayGrid
.
setToDate
(
date
,
isInitialMonth
);
...
...
@@ -70,7 +78,7 @@ Kirigami.Page {
Loader
{
id
:
swipeableViewLoader
anchors.fill
:
parent
active
:
true
active
:
Kalendar
.
Config
.
monthGridMode
===
Kalendar
.
Config
.
SwipeableMonthGrid
sourceComponent
:
SwipeableMonthGridView
{
anchors.fill
:
parent
...
...
@@ -93,7 +101,7 @@ Kirigami.Page {
Loader
{
id
:
basicViewLoader
anchors.fill
:
parent
active
:
false
active
:
Kalendar
.
Config
.
monthGridMode
===
Kalendar
.
Config
.
BasicMonthGrid
sourceComponent
:
BasicMonthGridView
{
anchors.fill
:
parent
...
...
src/contents/ui/Settings/ViewSettingsPage.qml
View file @
48b4cd9f
...
...
@@ -70,8 +70,43 @@ Kirigami.ScrollablePage {
contentItem
:
ColumnLayout
{
spacing
:
0
MobileForm.FormCardHeader
{
title
:
i18n
(
"
Month
V
iew settings
"
)
title
:
i18n
(
"
Month
v
iew settings
"
)
}
Controls.ButtonGroup
{
id
:
monthGridModeGroup
exclusive
:
true
onCheckedButtonChanged
:
{
Config
.
monthGridMode
=
checkedButton
.
value
;
Config
.
save
();
}
}
MobileForm.FormSectionText
{
text
:
i18n
(
"
Month view mode
"
)
}
ColumnLayout
{
spacing
:
0
Layout.fillWidth
:
true
MobileForm.FormRadioDelegate
{
property
int
value
:
Config
.
SwipeableMonthGrid
text
:
i18n
(
"
Swipeable month grid
"
)
enabled
:
!
Config
.
isMonthGridModeImmutable
checked
:
Config
.
monthGridMode
===
value
Controls.ButtonGroup.group
:
monthGridModeGroup
}
MobileForm.FormRadioDelegate
{
property
int
value
:
Config
.
BasicMonthGrid
text
:
i18n
(
"
Basic month grid
"
)
enabled
:
!
Config
.
isMonthGridModeImmutable
checked
:
Config
.
monthGridMode
===
value
Controls.ButtonGroup.group
:
monthGridModeGroup
}
MobileForm.FormTextDelegate
{
text
:
i18n
(
"
Swipeable month grid requires higher system performance.
"
)
visible
:
Config
.
monthGridMode
===
Config
.
SwipeableMonthGrid
}
}
Controls.ButtonGroup
{
id
:
weekdayLabelGroup
exclusive
:
true
...
...
src/kalendarconfig.kcfg
View file @
48b4cd9f
...
...
@@ -92,6 +92,19 @@ SPDX-License-Identifier: LGPL-2.0-or-later
</entry>
</group>
<group
name=
"MonthView"
>
<entry
name=
"monthGridMode"
type=
"Enum"
>
<label>
Type of day grid view to be used internally in the month view"
</label>
<choices>
<choice
name=
"SwipeableMonthGrid"
>
<label>
Swipeable month grid
</label>
</choice>
<choice
name=
"BasicMonthGrid"
>
<label>
Basic month grid
</label>
</choice>
</choices>
<default>
SwipeableMonthGrid
</default>
</entry>
<entry
name=
"weekdayLabelAlignment"
type=
"Enum"
>
<label>
Alignment of week day header in month view.
</label>
<choices>
...
...
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