waffles: make calendar more 🍔🦅-friendly

do we care about somalia and ethiopia
This commit is contained in:
end-4
2025-11-27 08:14:15 +01:00
parent d27fbede2a
commit d40df98aa5
3 changed files with 17 additions and 3 deletions
@@ -282,6 +282,10 @@ Singleton {
property int suspend: 3
}
property JsonObject calendar: JsonObject {
property bool forceMondayWeekStart: true
}
property JsonObject cheatsheet: JsonObject {
// Use a nerdfont to see the icons
// 0: 󰖳 | 1: 󰌽 | 2: 󰘳 | 3:  | 4: 󰨡
@@ -581,7 +585,7 @@ Singleton {
}
property JsonObject waffles: JsonObject {
// Animations on Windoes are kinda janky. Setting the following to
// Some spots are kinda janky/awkward. Setting the following to
// false will make (some) stuff also be like that for accuracy.
// Example: the right-click menu of the Start button
property JsonObject tweaks: JsonObject {
@@ -1,4 +1,5 @@
pragma ComponentBehavior: Bound
import QtQml
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
@@ -21,7 +22,8 @@ Item {
// Configuration
property int paddingWeeks: 2 // 1 should be sufficient with proper clipping and no padding
property bool american: false // 🍔🦅 = Sunday first
property var locale: Qt.locale() // Should be of type Locale but QML is being funny
property bool american: locale.firstDayOfWeek == Locale.Sunday
// Scrolling
function scrollMonthsAndSnap(x) { // Scroll x months and snap to month
@@ -104,10 +106,13 @@ Item {
}
spacing: root.buttonSpacing
Repeater {
model: root.totalWeeks
WeekRow {
required property int index
sundayFirst: root.american
date: new Date(root.dateInFirstWeek.getTime() + (index * root.millisPerWeek))
Layout.fillWidth: true
spacing: root.buttonSpacing