mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-24 14:35:40 +00:00
Update UI Color with recommandation and fix the issues with dark theme
This commit is contained in:
@ -1,53 +0,0 @@
|
||||
import Lomiri.Components 1.3
|
||||
import Lomiri.Components.Popups 1.3
|
||||
import QtQuick 2.4
|
||||
|
||||
Dialog {
|
||||
id: doubleValidationDialog
|
||||
|
||||
property int nb_validation: 0
|
||||
property string text1
|
||||
property string text2
|
||||
|
||||
signal doubleValidated()
|
||||
signal canceled()
|
||||
|
||||
Text {
|
||||
visible: nb_validation == 0
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: text1
|
||||
}
|
||||
|
||||
Text {
|
||||
visible: nb_validation == 1
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: text2
|
||||
}
|
||||
|
||||
Button {
|
||||
text: i18n.tr("Ok")
|
||||
color: LomiriColors.green
|
||||
onClicked: {
|
||||
if (nb_validation == 1) {
|
||||
nb_validation = 0;
|
||||
doubleValidated();
|
||||
PopupUtils.close(doubleValidationDialog);
|
||||
} else {
|
||||
nb_validation += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: cancelButton
|
||||
|
||||
text: i18n.tr("Cancel")
|
||||
color: LomiriColors.red
|
||||
onClicked: {
|
||||
nb_validation = 0;
|
||||
canceled();
|
||||
PopupUtils.close(doubleValidationDialog);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,7 @@ import Lomiri.Components.Popups 1.3
|
||||
import QtQuick 2.4
|
||||
|
||||
Dialog {
|
||||
id: dialogError
|
||||
id: dialog
|
||||
|
||||
property string textError
|
||||
|
||||
@ -14,10 +14,9 @@ Dialog {
|
||||
|
||||
Button {
|
||||
text: i18n.tr("Close")
|
||||
color: LomiriColors.red
|
||||
onClicked: function() {
|
||||
dialogClosed();
|
||||
PopupUtils.close(dialogError);
|
||||
PopupUtils.close(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ import Lomiri.Components.Popups 1.3
|
||||
import QtQuick 2.4
|
||||
|
||||
Dialog {
|
||||
id: passphraseProvider
|
||||
id: dialog
|
||||
|
||||
signal validated(string passphrase)
|
||||
signal canceled()
|
||||
@ -27,11 +27,11 @@ Dialog {
|
||||
id: okButton
|
||||
|
||||
text: i18n.tr("Ok")
|
||||
color: LomiriColors.green
|
||||
color: theme.palette.normal.positive
|
||||
onClicked: {
|
||||
validated(passphraseField.text);
|
||||
passphraseField.text = "";
|
||||
PopupUtils.close(passphraseProvider);
|
||||
PopupUtils.close(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,10 +39,9 @@ Dialog {
|
||||
id: cancelButton
|
||||
|
||||
text: i18n.tr("Cancel")
|
||||
color: LomiriColors.red
|
||||
onClicked: {
|
||||
canceled();
|
||||
PopupUtils.close(passphraseProvider);
|
||||
PopupUtils.close(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,24 +3,28 @@ import Lomiri.Components.Popups 1.3
|
||||
import QtQuick 2.4
|
||||
|
||||
Dialog {
|
||||
id: doubleValidationDialog
|
||||
id: dialog
|
||||
|
||||
property string text
|
||||
property string continueText: i18n.tr("Ok")
|
||||
property color continueColor: theme.palette.normal.positive
|
||||
|
||||
signal validated()
|
||||
signal canceled()
|
||||
|
||||
Text {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: doubleValidationDialog.text
|
||||
text: dialog.text
|
||||
}
|
||||
|
||||
Button {
|
||||
text: i18n.tr("Ok")
|
||||
color: LomiriColors.green
|
||||
id: continueButton
|
||||
|
||||
text: dialog.continueText
|
||||
color: dialog.continueColor
|
||||
onClicked: {
|
||||
validated();
|
||||
PopupUtils.close(doubleValidationDialog);
|
||||
PopupUtils.close(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,10 +32,9 @@ Dialog {
|
||||
id: cancelButton
|
||||
|
||||
text: i18n.tr("Cancel")
|
||||
color: LomiriColors.red
|
||||
onClicked: {
|
||||
canceled();
|
||||
PopupUtils.close(doubleValidationDialog);
|
||||
PopupUtils.close(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ import Lomiri.Components.Popups 1.3
|
||||
import QtQuick 2.4
|
||||
|
||||
Dialog {
|
||||
id: dialogSuccess
|
||||
id: dialog
|
||||
|
||||
property string textSuccess
|
||||
|
||||
@ -14,10 +14,9 @@ Dialog {
|
||||
|
||||
Button {
|
||||
text: i18n.tr("OK")
|
||||
color: LomiriColors.green
|
||||
onClicked: function() {
|
||||
dialogClosed();
|
||||
PopupUtils.close(dialogSuccess);
|
||||
PopupUtils.close(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user