Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_0] Fix calendar panel not dark theme friendly and won't open to set date #4727

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/qml/imports/QFieldControls/+Qt6/CalendarPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Popup {

onAboutToShow: {
if (selectedDate !== undefined) {
calendar.month = selectedDate.getMonth();
calendar.year = selectedDate.getFullYear();
hoursSpinBox.value = selectedDate.getHours();
minutesSpinBox.value = selectedDate.getMinutes();
secondsSpinBox.value = selectedDate.getSeconds();
Expand Down Expand Up @@ -83,6 +85,7 @@ Popup {
QfToolButton {
enabled: true
iconSource: Theme.getThemeIcon( 'ic_doublearrow_left_black_24dp' )
iconColor: Theme.mainTextColor
bgcolor: "transparent"
roundborder: true

Expand All @@ -103,6 +106,7 @@ Popup {
QfToolButton {
enabled: true
iconSource: Theme.getThemeIcon( 'ic_arrow_left_black_24dp' )
iconColor: Theme.mainTextColor
bgcolor: "transparent"
roundborder: true

Expand All @@ -128,6 +132,7 @@ Popup {
Layout.row: 0
Layout.fillWidth: true
font: Theme.tipFont
color: Theme.mainTextColor
}

Row {
Expand All @@ -137,6 +142,7 @@ Popup {
QfToolButton {
enabled: true
iconSource: Theme.getThemeIcon( 'ic_arrow_right_black_24dp' )
iconColor: Theme.mainTextColor
bgcolor: "transparent"
roundborder: true

Expand All @@ -156,6 +162,7 @@ Popup {
QfToolButton {
enabled: true
iconSource: Theme.getThemeIcon( 'ic_doublearrow_right_black_24dp' )
iconColor: Theme.mainTextColor
bgcolor: "transparent"
roundborder: true

Expand All @@ -181,6 +188,14 @@ Popup {
Layout.columnSpan: 3
Layout.row: 1
Layout.fillWidth: true

delegate: Text {
text: model.shortName
font: Theme.tipFont
color: Theme.secondaryTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}

MonthGrid {
Expand Down Expand Up @@ -236,7 +251,7 @@ Popup {
font.pointSize: Theme.tipFont.pointSize
font.bold: parent.isSelectedDate ? true : false
font.underline: parent.isNow ? true : false
color: parent.isSelectedDate ? "white" : "black"
color: parent.isSelectedDate ? "white" : Theme.mainTextColor
}
}

Expand Down