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:
+15
-5
@@ -233,19 +233,29 @@ ApplicationWindow {
|
|||||||
id: mainSplit
|
id: mainSplit
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
orientation: Qt.Horizontal
|
orientation: Qt.Horizontal
|
||||||
// тонкая линия-разделитель под тему
|
// Увеличенная зона захвата для удобного перетаскивания
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
implicitWidth: 1
|
implicitWidth: 6
|
||||||
implicitHeight: 1
|
implicitHeight: 6
|
||||||
color: Theme.divider
|
color: Theme.divider
|
||||||
Rectangle { // увеличенная зона захвата
|
// Видимая тонкая линия по центру
|
||||||
|
Rectangle {
|
||||||
anchors.centerIn: parent
|
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"
|
color: "transparent"
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.SplitHCursor
|
cursorShape: Qt.SplitHCursor
|
||||||
|
hoverEnabled: true
|
||||||
onPressed: mouse.accepted = false
|
onPressed: mouse.accepted = false
|
||||||
|
ToolTip.visible: containsMouse
|
||||||
|
ToolTip.text: qsTr("Перетащите для изменения размера")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,10 +242,28 @@ Item {
|
|||||||
anchors.bottom: toolbar.top
|
anchors.bottom: toolbar.top
|
||||||
orientation: Qt.Horizontal
|
orientation: Qt.Horizontal
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
implicitWidth: viewMode === "live" ? 1 : 0
|
implicitWidth: viewMode === "live" ? 6 : 0
|
||||||
implicitHeight: viewMode === "live" ? 1 : 0
|
implicitHeight: viewMode === "live" ? 6 : 0
|
||||||
color: Theme.divider
|
color: Theme.divider
|
||||||
visible: viewMode === "live"
|
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
|
// Редактор — виден в edit и live
|
||||||
|
|||||||
@@ -42,15 +42,15 @@ Item {
|
|||||||
text: "‹"
|
text: "‹"
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.bold: true
|
font.bold: true
|
||||||
implicitWidth: 32
|
implicitWidth: 28
|
||||||
implicitHeight: 32
|
implicitHeight: 28
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 28
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 28
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
|
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
|
||||||
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
|
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
|
||||||
radius: 16
|
radius: 14
|
||||||
}
|
}
|
||||||
contentItem: Label {
|
contentItem: Label {
|
||||||
text: parent.text
|
text: parent.text
|
||||||
@@ -61,33 +61,45 @@ Item {
|
|||||||
}
|
}
|
||||||
onClicked: cal.currentMonth = new Date(year, month - 1, 1)
|
onClicked: cal.currentMonth = new Date(year, month - 1, 1)
|
||||||
}
|
}
|
||||||
|
// Поле месяца и года — шире, чтобы всегда влезало, год не пропадает
|
||||||
|
// Разделяем на два Label: месяц (эластичный, с elide) и год (фикс)
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumWidth: 80
|
Layout.minimumWidth: 70
|
||||||
Layout.preferredWidth: 120
|
Layout.preferredWidth: 110
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignRight
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.text
|
color: Theme.text
|
||||||
font.pixelSize: 12
|
font.pixelSize: 11
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
wrapMode: Text.NoWrap
|
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 {
|
ToolButton {
|
||||||
text: "›"
|
text: "›"
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.bold: true
|
font.bold: true
|
||||||
implicitWidth: 32
|
implicitWidth: 28
|
||||||
implicitHeight: 32
|
implicitHeight: 28
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 28
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 28
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
|
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
|
||||||
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
|
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
|
||||||
radius: 16
|
radius: 14
|
||||||
}
|
}
|
||||||
contentItem: Label {
|
contentItem: Label {
|
||||||
text: parent.text
|
text: parent.text
|
||||||
@@ -101,15 +113,15 @@ Item {
|
|||||||
ToolButton {
|
ToolButton {
|
||||||
text: "\u2302"
|
text: "\u2302"
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
implicitWidth: 32
|
implicitWidth: 28
|
||||||
implicitHeight: 32
|
implicitHeight: 28
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 28
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 28
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
|
color: parent.pressed ? Theme.surfaceSelected : (parent.hovered ? Theme.surfaceHover : Theme.surface)
|
||||||
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
|
border.color: parent.pressed ? Theme.accent : (parent.hovered ? Theme.borderStrong : Theme.border)
|
||||||
radius: 16
|
radius: 14
|
||||||
}
|
}
|
||||||
contentItem: Label {
|
contentItem: Label {
|
||||||
text: parent.text
|
text: parent.text
|
||||||
|
|||||||
@@ -37,11 +37,30 @@ Item {
|
|||||||
Connections { target: vaultIndex; function onIndexChanged() { root.refreshLinksTags() } }
|
Connections { target: vaultIndex; function onIndexChanged() { root.refreshLinksTags() } }
|
||||||
Timer { id: rebuildDebounce; interval: 800; onTriggered: if (fileStore.ready) vaultIndex.rebuild(fileStore.vault) }
|
Timer { id: rebuildDebounce; interval: 800; onTriggered: if (fileStore.ready) vaultIndex.rebuild(fileStore.vault) }
|
||||||
|
|
||||||
// Делаем панели ресайзабельными внутри правой колонки
|
// Делаем панели ресайзабельными внутри правой колонки — увеличенная зона
|
||||||
SplitView {
|
SplitView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
orientation: Qt.Vertical
|
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 {
|
Rectangle {
|
||||||
@@ -63,13 +82,6 @@ Item {
|
|||||||
anchors.leftMargin: 8; anchors.rightMargin: 4
|
anchors.leftMargin: 8; anchors.rightMargin: 4
|
||||||
Label { text: qsTr("Календарь"); font.bold: true; color: Theme.textSecondary; font.pixelSize: 12 }
|
Label { text: qsTr("Календарь"); font.bold: true; color: Theme.textSecondary; font.pixelSize: 12 }
|
||||||
Item { Layout.fillWidth: true }
|
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 }
|
Rectangle { Layout.fillWidth: true; height: 1; color: Theme.divider }
|
||||||
|
|||||||
Reference in New Issue
Block a user