[ui] MessageDialog: add presets and options

* add Info, Warning and Error presets
* add canCopy options to display/hide copy to clipboard button
* tweak paddings and font size
This commit is contained in:
Yann Lanthony 2018-08-03 14:25:16 +02:00
parent 1007c37ba4
commit 30f99b01f2
3 changed files with 44 additions and 20 deletions

View file

@ -12,17 +12,14 @@ QtObject {
property Component infoDialog: Component {
MessageDialog {
title: "Info"
icon.text: MaterialIcons.info
preset: "Info"
visible: true
}
}
property Component warningDialog: Component {
MessageDialog {
title: "Warning"
icon {
text: MaterialIcons.warning
color: "#FF9800"
}
preset: "Warning"
visible: true
}
}
@ -30,10 +27,7 @@ QtObject {
id: errorDialog
MessageDialog {
title: "Error"
icon {
text: MaterialIcons.error
color: "#F44336"
}
preset: "Error"
text: defaultErrorText
visible: true
}