Don't exceed the window size for dialogs.

This commit is contained in:
Adam Treat 2023-05-03 08:37:45 -04:00
parent 005898b1bc
commit fec5093351
5 changed files with 6 additions and 7 deletions

View File

@ -198,6 +198,8 @@ Window {
SettingsDialog {
id: settingsDialog
anchors.centerIn: parent
width: Math.min(1024, window.width - (window.width * .2))
height: Math.min(600, window.height - (window.height * .2))
}
Button {
@ -257,6 +259,8 @@ Window {
NetworkDialog {
id: networkDialog
anchors.centerIn: parent
width: Math.min(1024, window.width - (window.width * .2))
height: Math.min(600, window.height - (window.height * .2))
Item {
Accessible.role: Accessible.Dialog
Accessible.name: qsTr("Network dialog")
@ -518,6 +522,8 @@ Window {
ModelDownloaderDialog {
id: downloadNewModels
anchors.centerIn: parent
width: Math.min(1024, window.width - (window.width * .2))
height: Math.min(600, window.height - (window.height * .2))
Item {
Accessible.role: Accessible.Dialog
Accessible.name: qsTr("Download new models dialog")

View File

@ -10,8 +10,6 @@ import network
Dialog {
id: modelDownloaderDialog
width: 1024
height: 600
modal: true
opacity: 0.9
closePolicy: LLM.modelList.length === 0 ? Popup.NoAutoClose : (Popup.CloseOnEscape | Popup.CloseOnPressOutside)

View File

@ -13,8 +13,6 @@ Dialog {
modal: true
opacity: 0.9
padding: 20
width: 1024
height: column.height + dialogBox.height + 20
Theme {
id: theme

View File

@ -11,8 +11,6 @@ import llm
Dialog {
id: settingsDialog
modal: true
width: 1024
height: 600
opacity: 0.9
background: Rectangle {
anchors.fill: parent

View File

@ -12,7 +12,6 @@ Dialog {
modal: true
opacity: 0.9
padding: 20
width: 900
Theme {
id: theme