mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 06:42:10 +02:00
Set up QML tests for message box modal dialog restyling
This commit is contained in:
parent
ea247cd796
commit
26a46207c2
1 changed files with 29 additions and 6 deletions
|
@ -81,17 +81,25 @@ ApplicationWindow {
|
|||
}
|
||||
*/
|
||||
Button {
|
||||
text: "Show Long Error"
|
||||
// Replicates message box that pops up after selecting new avatar. Includes title.
|
||||
text: "Confirm Avatar"
|
||||
onClicked: {
|
||||
desktop.messageBox({
|
||||
informativeText: "Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds ",
|
||||
text: "Baloney",
|
||||
icon: OriginalDialogs.StandardIcon.Warning,
|
||||
detailedText: "sakjd;laskj dksa;dl jka;lsd j;lkjas ;dlkaj s;dlakjd ;alkjda; slkjda; lkjda;lksjd ;alksjd; alksjd ;alksjd; alksjd; alksdjas;ldkjas;lkdja ;kj ;lkasjd; lkj as;dlka jsd;lka jsd;laksjd a"
|
||||
var messageBox = desktop.messageBox({
|
||||
title: "Set Avatar",
|
||||
text: "Would you like to use 'Albert' for your avatar?",
|
||||
icon: OriginalDialogs.StandardIcon.Question,
|
||||
//icon: OriginalDialogs.StandardIcon.Information, // Test informaton icon
|
||||
//icon: OriginalDialogs.StandardIcon.Warning, // Test warning icon
|
||||
//icon: OriginalDialogs.StandardIcon.Critical, // Test critical icon
|
||||
buttons: OriginalDialogs.StandardButton.Ok + OriginalDialogs.StandardButton.Cancel
|
||||
});
|
||||
messageBox.selected.connect(function(button) {
|
||||
console.log("You clicked " + button)
|
||||
})
|
||||
}
|
||||
}
|
||||
Button {
|
||||
// Message without title.
|
||||
text: "Show Error"
|
||||
onClicked: {
|
||||
var messageBox = desktop.messageBox({
|
||||
|
@ -103,6 +111,20 @@ ApplicationWindow {
|
|||
})
|
||||
}
|
||||
}
|
||||
Button {
|
||||
// detailedText is not currently used anywhere in Interface but it is easier to leave in and style good enough.
|
||||
text: "Show Long Error"
|
||||
onClicked: {
|
||||
desktop.messageBox({
|
||||
informativeText: "Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds ",
|
||||
text: "Baloney",
|
||||
icon: OriginalDialogs.StandardIcon.Warning,
|
||||
detailedText: "sakjd;laskj dksa;dl jka;lsd j;lkjas ;dlkaj s;dlakjd ;alkjda; slkjda; lkjda;lksjd ;alksjd; alksjd ;alksjd; alksjd; alksdjas;ldkjas;lkdja ;kj ;lkasjd; lkj as;dlka jsd;lka jsd;laksjd a"
|
||||
});
|
||||
}
|
||||
}
|
||||
/*
|
||||
// There is no such desktop.queryBox() function; may need to update test to cover QueryDialog.qml?
|
||||
Button {
|
||||
text: "Show Query"
|
||||
onClicked: {
|
||||
|
@ -120,6 +142,7 @@ ApplicationWindow {
|
|||
})
|
||||
}
|
||||
}
|
||||
*/
|
||||
Button {
|
||||
text: "Open Directory"
|
||||
property var builder: Component {
|
||||
|
|
Loading…
Reference in a new issue