mirror of https://github.com/nomic-ai/gpt4all
Add a close button for dialogs.
parent
fb576fbd7e
commit
db528ef1b0
@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="#7d7d8e" viewBox="0 0 352 512"><path d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"/></svg>
|
||||
<!--
|
||||
Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com
|
||||
License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
-->
|
After Width: | Height: | Size: 686 B |
@ -0,0 +1,33 @@
|
||||
import QtCore
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Basic
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Layouts
|
||||
|
||||
Dialog {
|
||||
id: myDialog
|
||||
background: Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
color: theme.backgroundDarkest
|
||||
border.width: 1
|
||||
border.color: theme.dialogBorder
|
||||
radius: 10
|
||||
}
|
||||
|
||||
MyToolButton {
|
||||
x: 0 + myDialog.width - myDialog.padding - width - 15
|
||||
y: 0 - myDialog.padding + 15
|
||||
z: 300
|
||||
visible: myDialog.closePolicy != Popup.NoAutoClose
|
||||
width: 30
|
||||
height: 30
|
||||
padding: 0
|
||||
source: "qrc:/gpt4all/icons/close.svg"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
onClicked: {
|
||||
myDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue