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:
@@ -242,10 +242,28 @@ Item {
|
||||
anchors.bottom: toolbar.top
|
||||
orientation: Qt.Horizontal
|
||||
handle: Rectangle {
|
||||
implicitWidth: viewMode === "live" ? 1 : 0
|
||||
implicitHeight: viewMode === "live" ? 1 : 0
|
||||
implicitWidth: viewMode === "live" ? 6 : 0
|
||||
implicitHeight: viewMode === "live" ? 6 : 0
|
||||
color: Theme.divider
|
||||
visible: viewMode === "live"
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: 1; height: parent.height
|
||||
color: Theme.divider
|
||||
visible: parent.visible
|
||||
}
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: 16; height: parent.height
|
||||
color: "transparent"
|
||||
visible: parent.visible
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.SplitHCursor
|
||||
hoverEnabled: true
|
||||
onPressed: mouse.accepted = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Редактор — виден в edit и live
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -37,11 +37,30 @@ Item {
|
||||
Connections { target: vaultIndex; function onIndexChanged() { root.refreshLinksTags() } }
|
||||
Timer { id: rebuildDebounce; interval: 800; onTriggered: if (fileStore.ready) vaultIndex.rebuild(fileStore.vault) }
|
||||
|
||||
// Делаем панели ресайзабельными внутри правой колонки
|
||||
// Делаем панели ресайзабельными внутри правой колонки — увеличенная зона
|
||||
SplitView {
|
||||
anchors.fill: parent
|
||||
orientation: Qt.Vertical
|
||||
handle: Rectangle { implicitHeight: 1; color: Theme.divider }
|
||||
handle: Rectangle {
|
||||
implicitHeight: 6
|
||||
color: Theme.divider
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
height: 1; width: parent.width
|
||||
color: Theme.divider
|
||||
}
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
height: 16; width: parent.width
|
||||
color: "transparent"
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.SplitVCursor
|
||||
hoverEnabled: true
|
||||
onPressed: mouse.accepted = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Календарь
|
||||
Rectangle {
|
||||
@@ -63,13 +82,6 @@ Item {
|
||||
anchors.leftMargin: 8; anchors.rightMargin: 4
|
||||
Label { text: qsTr("Календарь"); font.bold: true; color: Theme.textSecondary; font.pixelSize: 12 }
|
||||
Item { Layout.fillWidth: true }
|
||||
ToolButton {
|
||||
text: "\u2637"
|
||||
font.pixelSize: 12
|
||||
ToolTip.text: qsTr("Сегодня")
|
||||
ToolTip.visible: hovered
|
||||
onClicked: cal.currentMonth = new Date()
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle { Layout.fillWidth: true; height: 1; color: Theme.divider }
|
||||
|
||||
Reference in New Issue
Block a user