mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-05-03 22:17:22 +00:00
Signed-off-by: Adam Treat <treat.adam@gmail.com> Signed-off-by: Jared Van Bortel <jared@nomic.ai> Co-authored-by: Jared Van Bortel <jared@nomic.ai>
53 lines
1.4 KiB
QML
53 lines
1.4 KiB
QML
import Qt5Compat.GraphicalEffects
|
|
import QtCore
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Controls.Basic
|
|
import QtQuick.Layouts
|
|
|
|
MenuItem {
|
|
id: item
|
|
background: Rectangle {
|
|
radius: 10
|
|
width: parent.width -20
|
|
color: item.highlighted ? theme.menuHighlightColor : theme.menuBackgroundColor
|
|
}
|
|
|
|
contentItem: RowLayout {
|
|
spacing: 0
|
|
Item {
|
|
visible: item.icon.source.toString() !== ""
|
|
Layout.leftMargin: 6
|
|
Layout.preferredWidth: item.icon.width
|
|
Layout.preferredHeight: item.icon.height
|
|
Image {
|
|
id: image
|
|
anchors.centerIn: parent
|
|
visible: false
|
|
fillMode: Image.PreserveAspectFit
|
|
mipmap: true
|
|
sourceSize.width: item.icon.width
|
|
sourceSize.height: item.icon.height
|
|
source: item.icon.source
|
|
}
|
|
ColorOverlay {
|
|
anchors.fill: image
|
|
source: image
|
|
color: theme.textColor
|
|
}
|
|
}
|
|
Text {
|
|
Layout.alignment: Qt.AlignLeft
|
|
padding: 5
|
|
text: item.text
|
|
color: theme.textColor
|
|
font.pixelSize: theme.fontSizeLarge
|
|
}
|
|
Rectangle {
|
|
color: "transparent"
|
|
Layout.fillWidth: true
|
|
height: 1
|
|
}
|
|
}
|
|
}
|