feat: Add separator to chat top bar

This commit is contained in:
Petr Mironychev
2025-12-08 10:18:12 +01:00
parent 9f050aec67
commit 14e7ea2ec3
4 changed files with 63 additions and 25 deletions

View File

@ -17,6 +17,7 @@ qt_add_qml_module(QodeAssistUIControls
RESOURCES
icons/dropdown-arrow-light.svg
icons/dropdown-arrow-dark.svg
QML_FILES qml/QoASeparator.qml
)
target_link_libraries(QodeAssistUIControls

View File

@ -24,15 +24,10 @@ import QtQuick.Controls.Basic as Basic
Basic.ComboBox {
id: control
implicitWidth: Math.min(contentItem.implicitWidth + 8, 300)
implicitHeight: 30
property real popupContentWidth: 100
TextMetrics {
id: textMetrics
font.pixelSize: 12
}
implicitWidth: Math.min(contentItem.implicitWidth + 8, 300)
implicitHeight: 30
function updatePopupWidth() {
var maxWidth = 100;
@ -47,6 +42,7 @@ Basic.ComboBox {
onModelChanged: updatePopupWidth()
Component.onCompleted: updatePopupWidth()
clip: true
indicator: Image {
id: dropdownIcon
@ -178,5 +174,10 @@ Basic.ComboBox {
}
}
}
TextMetrics {
id: textMetrics
font.pixelSize: 12
}
}

View 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
}