From 8f28964ce2f9c5b4cc896a99433f853445886097 Mon Sep 17 00:00:00 2001 From: pokamest Date: Sat, 22 Jan 2022 18:19:57 +0300 Subject: [PATCH] Tiny ui fixes --- client/ui/qml/Pages/PageVPN.qml | 4 ++-- client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml | 1 - client/ui/uilogic.cpp | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/ui/qml/Pages/PageVPN.qml b/client/ui/qml/Pages/PageVPN.qml index 6312f416..a4c86714 100644 --- a/client/ui/qml/Pages/PageVPN.qml +++ b/client/ui/qml/Pages/PageVPN.qml @@ -108,7 +108,7 @@ PageBase { Layout.alignment: Qt.AlignLeft height: 21 background: Item {} - text: VpnLogic.labelCurrentServer + text: VpnLogic.labelCurrentServer + " →" font.family: "Lato" font.styleName: "normal" font.pixelSize: 16 @@ -136,7 +136,7 @@ PageBase { Layout.alignment: Qt.AlignLeft height: 21 background: Item {} - text: VpnLogic.labelCurrentService + text: VpnLogic.labelCurrentService + " →" font.family: "Lato" font.styleName: "normal" font.pixelSize: 16 diff --git a/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml b/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml index 88239fb5..be198ec5 100644 --- a/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml +++ b/client/ui/qml/Pages/Protocols/PageProtoShadowSocks.qml @@ -11,7 +11,6 @@ PageProtocolBase { protocol: ProtocolEnum.ShadowSocks logic: UiLogic.protocolLogic(protocol) - enabled: logic.pageEnabled BackButton { id: back } diff --git a/client/ui/uilogic.cpp b/client/ui/uilogic.cpp index ee2f7c53..9eb208b9 100644 --- a/client/ui/uilogic.cpp +++ b/client/ui/uilogic.cpp @@ -650,6 +650,7 @@ void UiLogic::saveTextFile(const QString& desc, const QString& ext, const QStrin QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), ext); if (fileName.isEmpty()) return; + if (!fileName.endsWith(ext)) fileName.append(ext); QFile save(fileName); save.open(QIODevice::WriteOnly); @@ -666,6 +667,7 @@ void UiLogic::saveBinaryFile(const QString &desc, const QString &ext, const QStr QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), ext); if (fileName.isEmpty()) return; + if (!fileName.endsWith(ext)) fileName.append(ext); QFile save(fileName); save.open(QIODevice::WriteOnly);