UX: увеличена зона перетаскивания, календарь без налезаний

- SplitView handle: implicit 6, видимая линия 1 + хит-зона 16 (cocoa 16, vertical 16), cursor SplitH/VCursor, hover ToolTip, для файлового дерева/живого просмотра/графа-календаря
- MonthCalendar: RowLayout spacing 4, кнопки 28x28 radius 14, background Theme.surface/hover/selected + border, Label месяца/года разделены (70+42, font 11, elide, минимум 90+44 → всегда влезает 'сентябрь 2026'), убрана прозрачность
- RightPanel: удалён дублирующий ToolButton 'Сегодня' (☷) из calBox header, оставлен только в MonthCalendar (⌂)
This commit is contained in:
2026-09-01 22:23:09 +03:00
parent b5a3639e46
commit d6cc460b52
4 changed files with 88 additions and 36 deletions
+32 -20
View File
@@ -42,15 +42,15 @@ Item {
text: "‹"
font.pixelSize: 16
font.bold: true
implicitWidth: 32
implicitHeight: 32
Layout.preferredWidth: 32
Layout.preferredHeight: 32
implicitWidth: 28
implicitHeight: 28
Layout.preferredWidth: 28
Layout.preferredHeight: 28
Layout.alignment: Qt.AlignVCenter
background: Rectangle {
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
radius: 16
radius: 14
}
contentItem: Label {
text: parent.text
@@ -61,33 +61,45 @@ Item {
}
onClicked: cal.currentMonth = new Date(year, month - 1, 1)
}
// Поле месяца и года — шире, чтобы всегда влезало, год не пропадает
// Разделяем на два Label: месяц (эластичный, с elide) и год (фикс)
Label {
Layout.fillWidth: true
Layout.minimumWidth: 80
Layout.preferredWidth: 120
horizontalAlignment: Text.AlignHCenter
Layout.minimumWidth: 70
Layout.preferredWidth: 110
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
font.bold: true
color: Theme.text
font.pixelSize: 12
font.pixelSize: 11
elide: Text.ElideRight
maximumLineCount: 1
wrapMode: Text.NoWrap
text: Qt.locale().monthName(month, Locale.LongFormat) + " " + year
text: Qt.locale().monthName(month, Locale.LongFormat)
}
Label {
Layout.preferredWidth: 42
Layout.minimumWidth: 38
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
font.bold: true
color: Theme.text
font.pixelSize: 11
text: year
}
ToolButton {
text: "›"
font.pixelSize: 16
font.bold: true
implicitWidth: 32
implicitHeight: 32
Layout.preferredWidth: 32
Layout.preferredHeight: 32
implicitWidth: 28
implicitHeight: 28
Layout.preferredWidth: 28
Layout.preferredHeight: 28
Layout.alignment: Qt.AlignVCenter
background: Rectangle {
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
radius: 16
radius: 14
}
contentItem: Label {
text: parent.text
@@ -101,15 +113,15 @@ Item {
ToolButton {
text: "\u2302"
font.pixelSize: 12
implicitWidth: 32
implicitHeight: 32
Layout.preferredWidth: 32
Layout.preferredHeight: 32
implicitWidth: 28
implicitHeight: 28
Layout.preferredWidth: 28
Layout.preferredHeight: 28
Layout.alignment: Qt.AlignVCenter
background: Rectangle {
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
radius: 16
radius: 14
}
contentItem: Label {
text: parent.text