From d6cc460b52bd7792d434f28e777cc751dd4c4a73 Mon Sep 17 00:00:00 2001 From: grendervill Date: Tue, 1 Sep 2026 22:23:09 +0300 Subject: [PATCH] =?UTF-8?q?UX:=20=D1=83=D0=B2=D0=B5=D0=BB=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B7=D0=BE=D0=BD=D0=B0=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D1=82=D0=B0=D1=81=D0=BA=D0=B8=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F,=20=D0=BA=D0=B0=D0=BB=D0=B5=D0=BD=D0=B4=D0=B0?= =?UTF-8?q?=D1=80=D1=8C=20=D0=B1=D0=B5=D0=B7=20=D0=BD=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=B7=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 (⌂) --- qml/MainWindow.qml | 20 ++++++++++---- qml/panels/EditorPanel.qml | 22 +++++++++++++-- qml/panels/MonthCalendar.qml | 52 ++++++++++++++++++++++-------------- qml/panels/RightPanel.qml | 30 ++++++++++++++------- 4 files changed, 88 insertions(+), 36 deletions(-) diff --git a/qml/MainWindow.qml b/qml/MainWindow.qml index e4fee90..1911e88 100644 --- a/qml/MainWindow.qml +++ b/qml/MainWindow.qml @@ -233,19 +233,29 @@ ApplicationWindow { id: mainSplit anchors.fill: parent orientation: Qt.Horizontal - // тонкая линия-разделитель под тему + // Увеличенная зона захвата для удобного перетаскивания handle: Rectangle { - implicitWidth: 1 - implicitHeight: 1 + implicitWidth: 6 + implicitHeight: 6 color: Theme.divider - Rectangle { // увеличенная зона захвата + // Видимая тонкая линия по центру + Rectangle { anchors.centerIn: parent - width: 8; height: parent.height + width: 1; height: parent.height + color: Theme.divider + } + // Большая невидимая зона для захвата мышью + Rectangle { + anchors.centerIn: parent + width: 16; height: parent.height color: "transparent" MouseArea { anchors.fill: parent cursorShape: Qt.SplitHCursor + hoverEnabled: true onPressed: mouse.accepted = false + ToolTip.visible: containsMouse + ToolTip.text: qsTr("Перетащите для изменения размера") } } } diff --git a/qml/panels/EditorPanel.qml b/qml/panels/EditorPanel.qml index a42b82c..6cd6d3e 100644 --- a/qml/panels/EditorPanel.qml +++ b/qml/panels/EditorPanel.qml @@ -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 diff --git a/qml/panels/MonthCalendar.qml b/qml/panels/MonthCalendar.qml index e7d0ecd..e4abd4c 100644 --- a/qml/panels/MonthCalendar.qml +++ b/qml/panels/MonthCalendar.qml @@ -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 diff --git a/qml/panels/RightPanel.qml b/qml/panels/RightPanel.qml index cd7772e..78e7737 100644 --- a/qml/panels/RightPanel.qml +++ b/qml/panels/RightPanel.qml @@ -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 }