mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-12-11 20:02:50 -05:00
feat: Add separator to chat top bar
This commit is contained in:
@ -91,7 +91,7 @@ Rectangle {
|
|||||||
|
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.delay: 250
|
ToolTip.delay: 250
|
||||||
ToolTip.text: qsTr("Switch AI configuration")
|
ToolTip.text: qsTr("Switch saved AI configuration")
|
||||||
}
|
}
|
||||||
|
|
||||||
QoAComboBox {
|
QoAComboBox {
|
||||||
@ -174,6 +174,10 @@ Rectangle {
|
|||||||
ToolTip.delay: 250
|
ToolTip.delay: 250
|
||||||
ToolTip.text: qsTr("Open Chat Assistant Settings")
|
ToolTip.text: qsTr("Open Chat Assistant Settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QoASeparator {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@ -235,18 +239,20 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QoAButton {
|
QoAButton {
|
||||||
id: clearButtonId
|
id: openChatHistoryId
|
||||||
|
|
||||||
icon {
|
icon {
|
||||||
source: "qrc:/qt/qml/ChatView/icons/clean-icon-dark.svg"
|
source: "qrc:/qt/qml/ChatView/icons/file-in-system.svg"
|
||||||
height: 15
|
height: 15
|
||||||
width: 8
|
width: 15
|
||||||
}
|
}
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.delay: 250
|
ToolTip.delay: 250
|
||||||
ToolTip.text: qsTr("Clean chat")
|
ToolTip.text: qsTr("Show in system")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QoASeparator {}
|
||||||
|
|
||||||
QoAButton {
|
QoAButton {
|
||||||
id: compressButtonId
|
id: compressButtonId
|
||||||
|
|
||||||
@ -292,19 +298,6 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QoAButton {
|
|
||||||
id: openChatHistoryId
|
|
||||||
|
|
||||||
icon {
|
|
||||||
source: "qrc:/qt/qml/ChatView/icons/file-in-system.svg"
|
|
||||||
height: 15
|
|
||||||
width: 15
|
|
||||||
}
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.delay: 250
|
|
||||||
ToolTip.text: qsTr("Show in system")
|
|
||||||
}
|
|
||||||
|
|
||||||
QoAButton {
|
QoAButton {
|
||||||
id: contextButtonId
|
id: contextButtonId
|
||||||
|
|
||||||
@ -327,6 +320,21 @@ Rectangle {
|
|||||||
ToolTip.delay: 250
|
ToolTip.delay: 250
|
||||||
ToolTip.text: qsTr("Current amount tokens in chat and LLM limit threshold")
|
ToolTip.text: qsTr("Current amount tokens in chat and LLM limit threshold")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QoASeparator {}
|
||||||
|
|
||||||
|
QoAButton {
|
||||||
|
id: clearButtonId
|
||||||
|
|
||||||
|
icon {
|
||||||
|
source: "qrc:/qt/qml/ChatView/icons/clean-icon-dark.svg"
|
||||||
|
height: 15
|
||||||
|
width: 8
|
||||||
|
}
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.delay: 250
|
||||||
|
ToolTip.text: qsTr("Clean chat")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,7 @@ qt_add_qml_module(QodeAssistUIControls
|
|||||||
RESOURCES
|
RESOURCES
|
||||||
icons/dropdown-arrow-light.svg
|
icons/dropdown-arrow-light.svg
|
||||||
icons/dropdown-arrow-dark.svg
|
icons/dropdown-arrow-dark.svg
|
||||||
|
QML_FILES qml/QoASeparator.qml
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(QodeAssistUIControls
|
target_link_libraries(QodeAssistUIControls
|
||||||
|
|||||||
@ -24,15 +24,10 @@ import QtQuick.Controls.Basic as Basic
|
|||||||
Basic.ComboBox {
|
Basic.ComboBox {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
implicitWidth: Math.min(contentItem.implicitWidth + 8, 300)
|
|
||||||
implicitHeight: 30
|
|
||||||
|
|
||||||
property real popupContentWidth: 100
|
property real popupContentWidth: 100
|
||||||
|
|
||||||
TextMetrics {
|
implicitWidth: Math.min(contentItem.implicitWidth + 8, 300)
|
||||||
id: textMetrics
|
implicitHeight: 30
|
||||||
font.pixelSize: 12
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePopupWidth() {
|
function updatePopupWidth() {
|
||||||
var maxWidth = 100;
|
var maxWidth = 100;
|
||||||
@ -47,6 +42,7 @@ Basic.ComboBox {
|
|||||||
|
|
||||||
onModelChanged: updatePopupWidth()
|
onModelChanged: updatePopupWidth()
|
||||||
Component.onCompleted: updatePopupWidth()
|
Component.onCompleted: updatePopupWidth()
|
||||||
|
clip: true
|
||||||
|
|
||||||
indicator: Image {
|
indicator: Image {
|
||||||
id: dropdownIcon
|
id: dropdownIcon
|
||||||
@ -178,5 +174,10 @@ Basic.ComboBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetrics
|
||||||
|
font.pixelSize: 12
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
28
UIControls/qml/QoASeparator.qml
Normal file
28
UIControls/qml/QoASeparator.qml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2025 Petr Mironychev
|
||||||
|
*
|
||||||
|
* This file is part of QodeAssist.
|
||||||
|
*
|
||||||
|
* QodeAssist is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* QodeAssist is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
height: 15
|
||||||
|
width: 1
|
||||||
|
color: palette.mid
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user