diff options
Diffstat (limited to 'src/gui/wizard')
-rw-r--r-- | src/gui/wizard/owncloudsetupnocredspage.ui | 26 | ||||
-rw-r--r-- | src/gui/wizard/owncloudsetuppage.cpp | 26 |
2 files changed, 38 insertions, 14 deletions
diff --git a/src/gui/wizard/owncloudsetupnocredspage.ui b/src/gui/wizard/owncloudsetupnocredspage.ui index 1644d93f9..d3e62595e 100644 --- a/src/gui/wizard/owncloudsetupnocredspage.ui +++ b/src/gui/wizard/owncloudsetupnocredspage.ui @@ -221,11 +221,17 @@ <item> <widget class="QLabel" name="urlLabel"> <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> + <property name="minimumSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> <property name="text"> <string/> </property> @@ -234,6 +240,16 @@ </layout> </item> <item> + <widget class="QLabel" name="addressDescriptionLabel"> + <property name="text"> + <string>This is the link to your %1 web interface when you open it in the browser.<br/>It looks like https://cloud.example.com or https://example.com/cloud</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> <widget class="QLabel" name="errorLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> @@ -340,7 +356,7 @@ <bool>false</bool> </property> <property name="text"> - <string>Register with a provider</string> + <string>Sign up with a provider</string> </property> <property name="default"> <bool>false</bool> @@ -362,7 +378,7 @@ </size> </property> <property name="text"> - <string>Log in</string> + <string>Log in to your %1</string> </property> <property name="autoDefault"> <bool>false</bool> @@ -472,8 +488,6 @@ <header>wizard/slideshow.h</header> </customwidget> </customwidgets> - <resources> - <include location="../../../theme.qrc"/> - </resources> + <resources/> <connections/> </ui> diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp index 1bc76fdef..8f03fa124 100644 --- a/src/gui/wizard/owncloudsetuppage.cpp +++ b/src/gui/wizard/owncloudsetuppage.cpp @@ -91,6 +91,11 @@ OwncloudSetupPage::OwncloudSetupPage(QWidget *parent) _ui.slideShow->hide(); #endif + const auto appName = Theme::instance()->appNameGUI(); + _ui.loginButton->setText(tr("Log in to your %1").arg(appName)); + _ui.addressDescriptionLabel->setText(tr("This is the link to your %1 web interface when you open it in the browser.<br/>" + "It looks like https://cloud.example.com or https://example.com/cloud").arg(appName)); + customizeStyle(); } @@ -125,6 +130,10 @@ void OwncloudSetupPage::setupCustomization() #ifdef WITH_PROVIDERS void OwncloudSetupPage::slotLogin() { + _ui.slideShow->hide(); + _ui.nextButton->hide(); + _ui.prevButton->hide(); + _ocWizard->setRegistration(false); _ui.login->setMaximumHeight(0); auto *animation = new QPropertyAnimation(_ui.login, "maximumHeight"); @@ -171,14 +180,15 @@ void OwncloudSetupPage::slotUrlChanged(const QString &url) _ui.leUrl->setText(newUrl); } - if (!url.startsWith(QLatin1String("https://"))) { - _ui.urlLabel->setPixmap(QPixmap(Theme::hidpiFileName(":/client/theme/lock-http.svg"))); - _ui.urlLabel->setToolTip(tr("This URL is NOT secure as it is not encrypted.\n" - "It is not advisable to use it.")); - } else { - _ui.urlLabel->setPixmap(QPixmap(Theme::hidpiFileName(":/client/theme/lock-https.svg"))); - _ui.urlLabel->setToolTip(tr("This URL is secure. You can use it.")); - } + const auto isSecure = url.startsWith(QLatin1String("https://")); + const auto toolTip = isSecure ? tr("This URL is secure. You can use it.") + : tr("This URL is NOT secure as it is not encrypted.\n" + "It is not advisable to use it."); + const auto pixmap = isSecure ? QPixmap(Theme::hidpiFileName(":/client/theme/lock-https.svg")) + : QPixmap(Theme::hidpiFileName(":/client/theme/lock-http.svg")); + + _ui.urlLabel->setToolTip(toolTip); + _ui.urlLabel->setPixmap(pixmap.scaled(_ui.urlLabel->size(), Qt::KeepAspectRatio)); } void OwncloudSetupPage::slotUrlEditFinished() |