mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
waffles: make calendar spacing more accurate
This commit is contained in:
@@ -87,7 +87,8 @@ Item {
|
||||
property real verticalPadding: 0
|
||||
property real buttonSize: 40
|
||||
property real buttonSpacing: 2
|
||||
implicitHeight: (6 * buttonSize) + (5 * buttonSpacing) + (2 * verticalPadding)
|
||||
property real buttonVerticalSpacing: buttonSpacing
|
||||
implicitHeight: (6 * buttonSize) + (5 * buttonVerticalSpacing) + (2 * verticalPadding)
|
||||
implicitWidth: weeksColumn.implicitWidth
|
||||
clip: true
|
||||
|
||||
@@ -98,13 +99,13 @@ Item {
|
||||
right: parent.right
|
||||
}
|
||||
y: {
|
||||
const spacePerExtraRow = root.buttonSize + root.buttonSpacing;
|
||||
const spacePerExtraRow = root.buttonSize + root.buttonVerticalSpacing;
|
||||
const origin = -(spacePerExtraRow * root.paddingWeeks);
|
||||
const diff = root.weekDiff * spacePerExtraRow;
|
||||
return origin + (-diff % spacePerExtraRow) + root.verticalPadding;
|
||||
}
|
||||
|
||||
spacing: root.buttonSpacing
|
||||
spacing: root.buttonVerticalSpacing
|
||||
|
||||
Repeater {
|
||||
model: root.totalWeeks
|
||||
|
||||
@@ -67,7 +67,8 @@ BodyRectangle {
|
||||
locale: root.locale
|
||||
verticalPadding: 2
|
||||
buttonSize: 41 // ???
|
||||
buttonSpacing: 1
|
||||
buttonSpacing: 6
|
||||
buttonVerticalSpacing: 1
|
||||
Layout.fillWidth: true
|
||||
delegate: DayButton {}
|
||||
}
|
||||
@@ -90,7 +91,7 @@ BodyRectangle {
|
||||
anchors.centerIn: parent
|
||||
text: dayButton.model.day
|
||||
color: dayButton.fgColor
|
||||
font.pixelSize: Looks.font.pixelSize.large
|
||||
font.pixelSize: Looks.font.pixelSize.larger
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user