Merge pull request #6150 from nextcloud/feature/settings-dialog-design-improvements

Improve Settings dialog design.
This commit is contained in:
allexzander 2023-10-23 16:45:47 +02:00 committed by GitHub
commit b3621877e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 669 additions and 442 deletions

View file

@ -18,7 +18,6 @@
#include "theme.h"
#include "configfile.h"
#include "application.h"
#include "configfile.h"
#include "owncloudsetupwizard.h"
#include "accountmanager.h"
#include "guiutility.h"
@ -124,7 +123,7 @@ void createDebugArchive(const QString &filename)
zip.writeData(clientParameters, clientParameters.size());
zip.finishWriting(clientParameters.size());
const auto buildInfo = QString(OCC::Theme::instance()->about() + "\n\n" + OCC::Theme::instance()->aboutDetails()).toUtf8();
const auto buildInfo = QString(OCC::Theme::instance()->aboutInfo() + "\n\n" + OCC::Theme::instance()->aboutDetails()).toUtf8();
zip.prepareWriting("__nextcloud_client_buildinfo.txt", {}, {}, buildInfo.size());
zip.writeData(buildInfo, buildInfo.size());
zip.finishWriting(buildInfo.size());
@ -169,14 +168,17 @@ GeneralSettings::GeneralSettings(QWidget *parent)
}
// setup about section
QString about = Theme::instance()->about();
_ui->aboutLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
_ui->aboutLabel->setText(about);
_ui->aboutLabel->setOpenExternalLinks(true);
_ui->infoAndUpdatesLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
_ui->infoAndUpdatesLabel->setText(Theme::instance()->about());
_ui->infoAndUpdatesLabel->setOpenExternalLinks(true);
// About legal notice
connect(_ui->legalNoticeButton, &QPushButton::clicked, this, &GeneralSettings::slotShowLegalNotice);
connect(_ui->usageDocumentationButton, &QPushButton::clicked, this, []() {
Utility::openBrowser(QUrl(Theme::instance()->helpUrl()));
});
loadMiscSettings();
// updater info now set in: customizeStyle
//slotUpdateInfo();
@ -277,7 +279,7 @@ void GeneralSettings::slotUpdateInfo()
const auto updater = Updater::instance();
if (ConfigFile().skipUpdateCheck() || !updater) {
// updater disabled on compile
_ui->updatesGroupBox->setVisible(false);
_ui->updatesContainer->setVisible(false);
return;
}
@ -517,15 +519,18 @@ void GeneralSettings::slotStyleChanged()
void GeneralSettings::customizeStyle()
{
// setup about section
QString about = Theme::instance()->about();
Theme::replaceLinkColorStringBackgroundAware(about);
_ui->aboutLabel->setText(about);
const auto aboutText = []() {
auto aboutText = Theme::instance()->about();
Theme::replaceLinkColorStringBackgroundAware(aboutText);
return aboutText;
}();
_ui->infoAndUpdatesLabel->setText(aboutText);
#if defined(BUILD_UPDATER)
// updater info
slotUpdateInfo();
#else
_ui->updatesGroupBox->setVisible(false);
_ui->updatesContainer->setVisible(false);
#endif
}

View file

@ -14,207 +14,6 @@
<string notr="true">Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QGroupBox" name="aboutGroupBox">
<property name="title">
<string>About</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="aboutLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>About</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="legalNoticeButton">
<property name="text">
<string>Legal notice</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="generalGroupBox">
<property name="title">
<string>General Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QCheckBox" name="monoIconsCheckBox">
<property name="toolTip">
<string>For System Tray</string>
</property>
<property name="text">
<string>Use &amp;Monochrome Icons</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="autostartCheckBox">
<property name="text">
<string>&amp;Launch on System Startup</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="serverNotificationsCheckBox">
<property name="text">
<string>Show Server &amp;Notifications</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="callNotificationsCheckBox">
<property name="text">
<string>Show Call Notifications</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="updatesGroupBox">
<property name="title">
<string>Updates</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QCheckBox" name="autoCheckForUpdatesCheckBox">
<property name="text">
<string>&amp;Automatically check for Updates</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="updateChannelLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Channel</string>
</property>
<property name="buddy">
<cstring>updateChannel</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="updateChannel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>stable</string>
</property>
</item>
<item>
<property name="text">
<string>beta</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="updateStateLabel">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="restartButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Restart &amp;&amp; Update</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="updateButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Check for Update now</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@ -356,7 +155,7 @@
<item>
<widget class="QCheckBox" name="showInExplorerNavigationPaneCheckBox">
<property name="text">
<string>Show sync folders in &amp;Explorer's Navigation Pane</string>
<string>Show sync folders in &amp;Explorer's navigation pane</string>
</property>
</widget>
</item>
@ -413,6 +212,239 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="aboutAndUpdatesGroupBox">
<property name="title">
<string>Info</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QFrame" name="updatesContainer">
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="infoAndUpdatesLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Desktop client x.x.x</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="updateChannelLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Update channel</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="updateChannel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>stable</string>
</property>
</item>
<item>
<property name="text">
<string>beta</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="updateStateLabel">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="restartButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Restart &amp;&amp; Update</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QCheckBox" name="autoCheckForUpdatesCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Automatically check for updates</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="updateButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Check Now</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="usageDocumentationButton">
<property name="text">
<string>Usage Documentation</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="legalNoticeButton">
<property name="text">
<string>Legal Notice</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="generalGroupBox">
<property name="title">
<string>General Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QCheckBox" name="monoIconsCheckBox">
<property name="toolTip">
<string>For System Tray</string>
</property>
<property name="text">
<string>Use &amp;monochrome icons</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="autostartCheckBox">
<property name="text">
<string>&amp;Launch on system startup</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="serverNotificationsCheckBox">
<property name="text">
<string>Show server &amp;notifications</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="callNotificationsCheckBox">
<property name="text">
<string>Show call notifications</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<tabstops>
@ -423,7 +455,6 @@
<tabstop>newFolderLimitCheckBox</tabstop>
<tabstop>newFolderLimitSpinBox</tabstop>
<tabstop>crashreporterCheckBox</tabstop>
<tabstop>autoCheckForUpdatesCheckBox</tabstop>
<tabstop>restartButton</tabstop>
</tabstops>
<resources/>

View file

@ -34,6 +34,8 @@ NetworkSettings::NetworkSettings(QWidget *parent)
{
_ui->setupUi(this);
_ui->manualSettings->setVisible(_ui->manualProxyRadioButton->isChecked());
_ui->proxyGroupBox->setVisible(!Theme::instance()->doNotUseProxy());
if (!Theme::instance()->doNotUseProxy()) {
@ -53,8 +55,7 @@ NetworkSettings::NetworkSettings(QWidget *parent)
_ui->authWidgets->setEnabled(_ui->authRequiredcheckBox->isChecked());
connect(_ui->authRequiredcheckBox, &QAbstractButton::toggled, _ui->authWidgets, &QWidget::setEnabled);
connect(_ui->manualProxyRadioButton, &QAbstractButton::toggled, _ui->manualSettings, &QWidget::setEnabled);
connect(_ui->manualProxyRadioButton, &QAbstractButton::toggled, _ui->typeComboBox, &QWidget::setEnabled);
connect(_ui->manualProxyRadioButton, &QAbstractButton::toggled, _ui->manualSettings, &QWidget::setVisible);
connect(_ui->manualProxyRadioButton, &QAbstractButton::toggled, this, &NetworkSettings::checkAccountLocalhost);
loadProxySettings();
@ -79,6 +80,11 @@ NetworkSettings::NetworkSettings(QWidget *parent)
loadBWLimitSettings();
_ui->downloadSpinBox->setVisible(_ui->downloadLimitRadioButton->isChecked());
_ui->downloadSpinBoxLabel->setVisible(_ui->downloadLimitRadioButton->isChecked());
_ui->uploadSpinBox->setVisible(_ui->uploadLimitRadioButton->isChecked());
_ui->uploadSpinBoxLabel->setVisible(_ui->uploadLimitRadioButton->isChecked());
connect(_ui->uploadLimitRadioButton, &QAbstractButton::clicked, this, &NetworkSettings::saveBWLimitSettings);
connect(_ui->noUploadLimitRadioButton, &QAbstractButton::clicked, this, &NetworkSettings::saveBWLimitSettings);
connect(_ui->autoUploadLimitRadioButton, &QAbstractButton::clicked, this, &NetworkSettings::saveBWLimitSettings);

View file

@ -6,34 +6,46 @@
<rect>
<x>0</x>
<y>0</y>
<width>623</width>
<height>581</height>
<width>524</width>
<height>527</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="proxyGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Proxy Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
<widget class="QComboBox" name="typeComboBox">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="noProxyRadioButton">
<property name="text">
<string>No Proxy</string>
<string>No proxy</string>
</property>
<property name="checked">
<bool>true</bool>
@ -53,142 +65,232 @@
</attribute>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="manualProxyRadioButton">
<property name="text">
<string>Specify proxy manually as</string>
<string>Manually specify proxy</string>
</property>
<attribute name="buttonGroup">
<string notr="true">proxyButtonGroup</string>
</attribute>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QWidget" name="manualSettings" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="rightMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item row="3" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QWidget" name="manualSettings" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="hostLabel">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QComboBox" name="typeComboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="hostLabel">
<property name="text">
<string>Host</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="hostLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string notr="true">:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="portSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>8080</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="authRequiredcheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Host</string>
<string>Proxy server requires authentication</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="hostLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
<widget class="QWidget" name="authWidgets" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="userLineEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="passwordLineEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelLocalhost">
<property name="text">
<string notr="true">:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="portSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>8080</number>
<string>Note: proxy settings have no effects for accounts on localhost</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="authRequiredcheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Proxy server requires authentication</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="authWidgets" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="userLineEdit">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="passwordLineEdit">
<property name="text">
<string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="labelLocalhost">
<property name="text">
<string>Note: proxy settings have no effects for accounts on localhost</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="0,0">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="downloadBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -196,14 +298,19 @@
<property name="title">
<string>Download Bandwidth</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="0">
<widget class="QRadioButton" name="downloadLimitRadioButton">
<property name="text">
<string>Limit to</string>
</property>
</widget>
</item>
<property name="topMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="noDownloadLimitRadioButton">
<property name="text">
@ -214,43 +321,6 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>147</width>
<height>25</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QSpinBox" name="downloadSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximum">
<number>999999</number>
</property>
<property name="value">
<number>80</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>KBytes/s</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="autoDownloadLimitRadioButton">
<property name="toolTip">
@ -261,13 +331,63 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="downloadLimitRadioButton">
<property name="text">
<string>Limit to</string>
</property>
</widget>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QSpinBox" name="downloadSpinBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximum">
<number>999999</number>
</property>
<property name="value">
<number>80</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="downloadSpinBoxLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>KBytes/s</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="uploadBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -275,40 +395,28 @@
<property name="title">
<string>Upload Bandwidth</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="2" column="0">
<widget class="QRadioButton" name="uploadLimitRadioButton">
<property name="text">
<string>Limit to</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="autoUploadLimitRadioButton">
<property name="toolTip">
<string>Limit to 3/4 of estimated bandwidth</string>
</property>
<property name="text">
<string>Limit automatically</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="noUploadLimitRadioButton">
<property name="text">
<string>No limit</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="topMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,0">
<item>
<widget class="QSpinBox" name="uploadSpinBox">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="minimum">
<number>1</number>
@ -322,7 +430,13 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="uploadSpinBoxLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>KBytes/s</string>
</property>
@ -330,27 +444,55 @@
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="autoUploadLimitRadioButton">
<property name="toolTip">
<string>Limit to 3/4 of estimated bandwidth</string>
</property>
<property name="text">
<string>Limit automatically</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="uploadLimitRadioButton">
<property name="text">
<string>Limit to</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="noUploadLimitRadioButton">
<property name="text">
<string>No limit</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
<zorder>autoUploadLimitRadioButton</zorder>
<zorder>uploadLimitRadioButton</zorder>
<zorder>noUploadLimitRadioButton</zorder>
<zorder>verticalSpacer_3</zorder>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
@ -359,15 +501,31 @@
<sender>downloadLimitRadioButton</sender>
<signal>toggled(bool)</signal>
<receiver>downloadSpinBox</receiver>
<slot>setEnabled(bool)</slot>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>73</x>
<y>69</y>
<x>75</x>
<y>315</y>
</hint>
<hint type="destinationlabel">
<x>131</x>
<y>78</y>
<x>49</x>
<y>334</y>
</hint>
</hints>
</connection>
<connection>
<sender>downloadLimitRadioButton</sender>
<signal>toggled(bool)</signal>
<receiver>downloadSpinBoxLabel</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>75</x>
<y>315</y>
</hint>
<hint type="destinationlabel">
<x>107</x>
<y>334</y>
</hint>
</hints>
</connection>
@ -375,15 +533,31 @@
<sender>uploadLimitRadioButton</sender>
<signal>toggled(bool)</signal>
<receiver>uploadSpinBox</receiver>
<slot>setEnabled(bool)</slot>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>322</x>
<y>101</y>
<x>330</x>
<y>315</y>
</hint>
<hint type="destinationlabel">
<x>411</x>
<y>106</y>
<x>304</x>
<y>334</y>
</hint>
</hints>
</connection>
<connection>
<sender>uploadLimitRadioButton</sender>
<signal>toggled(bool)</signal>
<receiver>uploadSpinBoxLabel</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>330</x>
<y>315</y>
</hint>
<hint type="destinationlabel">
<x>362</x>
<y>334</y>
</hint>
</hints>
</connection>

View file

@ -530,7 +530,7 @@ QString Theme::gitSHA1() const
const QString githubPrefix(QLatin1String(
"https://github.com/nextcloud/desktop/commit/"));
const QString gitSha1(QLatin1String(GIT_SHA1));
devString = QCoreApplication::translate("nextcloudTheme::about()",
devString = QCoreApplication::translate("nextcloudTheme::aboutInfo()",
"<p><small>Built from Git revision <a href=\"%1\">%2</a>"
" on %3, %4 using Qt %5, %6</small></p>")
.arg(githubPrefix + gitSha1)
@ -543,25 +543,31 @@ QString Theme::gitSHA1() const
return devString;
}
QString Theme::aboutInfo() const
{
// Shorten Qt's OS name: "macOS Mojave (10.14)" -> "macOS"
QStringList osStringList = Utility::platformName().split(QLatin1Char(' '));
QString osName = osStringList.at(0);
//: Example text: "<p>Nextcloud Desktop Client</p>" (%1 is the application name)
auto devString = QString(tr("<p>%1 Desktop Client</p><p>Version %1. For more information please click <a href='%2'>here</a>.</p>") + QStringLiteral(" (%3)"))
.arg(APPLICATION_NAME, QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION)), helpUrl(), osName);
devString += tr("<p><small>Using virtual files plugin: %1</small></p>").arg(Vfs::modeToString(bestAvailableVfsMode()));
devString += QStringLiteral("<br>%1").arg(QSysInfo::productType() % QLatin1Char('-') % QSysInfo::kernelVersion());
return devString;
}
QString Theme::about() const
{
// Shorten Qt's OS name: "macOS Mojave (10.14)" -> "macOS"
QStringList osStringList = Utility::platformName().split(QLatin1Char(' '));
QString osName = osStringList.at(0);
QString devString;
//: Example text: "<p>Nextcloud Desktop Client</p>" (%1 is the application name)
devString = tr("<p>%1 Desktop Client</p>")
.arg(APPLICATION_NAME);
devString += tr("<p>Version %1. For more information please click <a href='%2'>here</a>.</p>")
.arg(QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION)) + QString(" (%1)").arg(osName))
.arg(helpUrl());
devString += tr("<p><small>Using virtual files plugin: %1</small></p>")
.arg(Vfs::modeToString(bestAvailableVfsMode()));
devString += QStringLiteral("<br>%1")
.arg(QSysInfo::productType() % QLatin1Char('-') % QSysInfo::kernelVersion());
const auto devString = tr("<p>%1 desktop client %2</p>").arg(APPLICATION_NAME, QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION)));
return devString;
}

View file

@ -336,6 +336,11 @@ public:
*/
[[nodiscard]] QString gitSHA1() const;
/**
* About info text
*/
[[nodiscard]] QString aboutInfo() const;
/**
* About dialog contents
*/