refactor: Remove Chat preview scrollbar

This commit is contained in:
Petr Mironychev
2025-04-26 17:29:06 +02:00
parent a3edb8a577
commit ee672f2cda
4 changed files with 1 additions and 192 deletions

View File

@ -76,10 +76,6 @@ ChatRootView {
text: qsTr("Latest chat file name: %1").arg(root.chatFileName.length > 0 ? root.chatFileName : "Unsaved")
}
openChatHistory.onClicked: root.openChatHistoryFolder()
expandScrollbar {
text: scroll.isPreviewMode ? "»" : "«"
onClicked: scroll.isPreviewMode = !scroll.isPreviewMode
}
}
ListView {
@ -118,50 +114,6 @@ ChatRootView {
ScrollBar.vertical: QQC.ScrollBar {
id: scroll
property bool isPreviewMode: false
readonly property int previewWidth: 30
implicitWidth: isPreviewMode ? scroll.previewWidth : 16
contentItem: Rectangle {
implicitWidth: scroll.isPreviewMode ? scroll.previewWidth : 6
implicitHeight: 100
radius: 3
color: scroll.pressed ? palette.dark :
scroll.hovered ? palette.mid :
palette.button
Behavior on implicitWidth {
NumberAnimation { duration: 150 }
}
}
background: Rectangle {
color: scroll.isPreviewMode ? "transparent" :
palette.window.hslLightness > 0.5 ?
Qt.darker(palette.window, 1.1) :
Qt.lighter(palette.window, 1.1)
radius: 3
}
ChatPreviewBar {
anchors.fill: parent
targetView: chatListView
visible: parent.isPreviewMode
opacity: parent.isPreviewMode ? 1 : 0
Behavior on opacity {
NumberAnimation { duration: 150 }
}
}
Behavior on implicitWidth {
NumberAnimation {
duration: 150
easing.type: Easing.InOutQuad
}
}
}
onCountChanged: {