1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-07-05 03:22:27 +00:00

Update UI Color with recommandation and fix the issues with dark theme

This commit is contained in:
2025-01-13 20:51:29 +01:00
parent b022e30a89
commit 8ec593becc
15 changed files with 101 additions and 121 deletions

View File

@ -6,6 +6,8 @@ import QtQuick.Layouts 1.1
import "dialogs"
MainView {
//theme.name: "Lomiri.Components.Themes.SuruDark"
id: root
signal responsePassphraseDialog(bool canceled, string passphrase)

View File

@ -20,12 +20,14 @@ Item {
Rectangle {
anchors.fill: parent
color: theme.palette.normal.background
Text {
text: externalLink.text
anchors.left: parent.left
anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
}
Icon {

View File

@ -2,6 +2,7 @@ import "../dialogs"
import "../styles"
import Lomiri.Components 1.3
import Lomiri.Components.Popups 1.3
import Lomiri.Components.Themes 1.3
import Pass 1.0
import QtQuick 2.4
@ -14,12 +15,14 @@ Component {
anchors.right: parent.right
anchors.left: parent.left
height: units.gu(5)
color: theme.palette.normal.background
Text {
text: fileBaseName
anchors.left: parent.left
anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
}
Icon {

View File

@ -22,12 +22,14 @@ Item {
Rectangle {
anchors.fill: parent
color: theme.palette.normal.background
Text {
text: pageStackLink.text
anchors.left: parent.left
anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
}
Icon {

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -25,6 +25,7 @@ Page {
Rectangle {
width: parent.width
height: units.gu(1)
color: theme.palette.normal.background
}
Text {
@ -36,11 +37,13 @@ Page {
height: units.gu(8)
fontSizeMode: Text.Fit
font.pixelSize: 144
color: theme.palette.normal.backgroundText
}
Rectangle {
width: parent.width
height: units.gu(12)
color: theme.palette.normal.background
Image {
source: "../../assets/logo.svg"
@ -58,6 +61,7 @@ Page {
text: i18n.tr("<b>Version</b>")
fontSizeMode: Text.Fit
font.pixelSize: 72
color: theme.palette.normal.backgroundText
}
Text {
@ -68,6 +72,7 @@ Page {
height: units.gu(4)
fontSizeMode: Text.Fit
font.pixelSize: 72
color: theme.palette.normal.backgroundText
}
Text {
@ -77,6 +82,7 @@ Page {
text: i18n.tr("<b>Maintainer</>")
fontSizeMode: Text.Fit
font.pixelSize: 72
color: theme.palette.normal.backgroundText
}
Text {
@ -87,6 +93,7 @@ Page {
height: units.gu(2)
fontSizeMode: Text.Fit
font.pixelSize: 72
color: theme.palette.normal.backgroundText
}
}
@ -113,6 +120,7 @@ Page {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: i18n.tr("Released under the terms of the GNU GPL v3")
color: theme.palette.normal.backgroundText
}
}

View File

@ -66,6 +66,7 @@ Page {
id: buttonAdd
width: parent.width
color: theme.palette.normal.positive
text: i18n.tr('Clone')
onClicked: {
var ret = false;
@ -87,6 +88,8 @@ Page {
SimpleValidationDialog {
text: i18n.tr("Importing a git repo will delete<br>any existing password store!<br>Continue ?")
continueText: i18n.tr("Yes")
continueColor: theme.palette.normal.negative
onCanceled: {
pageStack.pop();
}

View File

@ -59,6 +59,8 @@ Page {
SimpleValidationDialog {
text: i18n.tr("Importing a new zip will delete<br>any existing password store!<br>Continue ?")
continueText: i18n.tr("Yes")
continueColor: theme.palette.normal.negative
onCanceled: {
pageStack.pop();
}

View File

@ -29,6 +29,7 @@ Page {
Rectangle {
width: parent.width
height: units.gu(1)
color: theme.palette.normal.background
}
Text {
@ -38,13 +39,20 @@ Page {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: i18n.tr('Key id : %1').arg(model.modelData.uid)
color: theme.palette.normal.backgroundText
}
Rectangle {
width: parent.width
height: units.gu(1)
color: theme.palette.normal.background
}
Button {
id: buttonDeleteKey
text: i18n.tr("Delete this key")
color: LomiriColors.red
color: theme.palette.normal.negative
onClicked: {
infoKeysPage.currentKey = model.modelData.uid;
PopupUtils.open(infoKeysPageDeleteValidation, infoKeysPage);
@ -54,6 +62,7 @@ Page {
Rectangle {
width: parent.width
height: units.gu(1)
color: theme.palette.normal.background
}
}
@ -63,10 +72,11 @@ Page {
Component {
id: infoKeysPageDeleteValidation
DoubleValidationDialog {
text1: i18n.tr("You're are about to delete<br>%1<br>Continue ?").arg(infoKeysPage.currentKey)
text2: i18n.tr("%1<br>will be definitively removed.<br>Continue ?").arg(infoKeysPage.currentKey)
onDoubleValidated: {
SimpleValidationDialog {
text: i18n.tr("You're are about to delete<br>%1<br>Continue ?").arg(infoKeysPage.currentKey)
continueText: i18n.tr("Yes")
continueColor: theme.palette.normal.negative
onValidated: {
var status = Pass.gpgDeleteKeyId(infoKeysPage.currentKey);
if (status)
PopupUtils.open(infoKeysPageDeleteSuccess);

View File

@ -21,6 +21,7 @@ Page {
width: parent.width
height: units.gu(4)
text: i18n.tr('GPG')
color: theme.palette.normal.backgroundText
}
PageStackLink {
@ -39,6 +40,7 @@ Page {
width: parent.width
height: units.gu(4)
text: i18n.tr('Password Store')
color: theme.palette.normal.backgroundText
}
PageStackLink {