Skip to content

Commit

Permalink
Improved folder sync setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen Fischer authored and Eugen Fischer committed Dec 14, 2023
1 parent abb7881 commit a558d1a
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/gui/nmcgui/nmcflow2authwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ namespace OCC {
NMCFlow2AuthWidget::NMCFlow2AuthWidget(QWidget *parent)
: Flow2AuthWidget(parent)
{
setWindowFlags(Qt::Window | Qt::FramelessWindowHint);

_ui.copyLinkLabel->setVisible(false);
_ui.openLinkLabel->setVisible(false);

Expand Down
17 changes: 16 additions & 1 deletion src/gui/nmcgui/nmcowncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,28 @@
*/

#include "nmcgui/nmcowncloudadvancedsetuppage.h"
#include "QtGui/qpainter.h"

namespace OCC {

NMCOwncloudAdvancedSetupPage::NMCOwncloudAdvancedSetupPage(OwncloudWizard *wizard)
: OwncloudAdvancedSetupPage(wizard)

{
setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
_ui.confCheckBoxSize->setVisible(false);
_ui.confSpinBox->setVisible(false);
_ui.confTraillingSizeLabel->setVisible(false);
_ui.confCheckBoxSize->setFixedSize(0,0);
_ui.confSpinBox->setFixedSize(0,0);
_ui.confTraillingSizeLabel->setFixedSize(0,0);
_ui.wSyncStrategy->removeItem(_ui.horizontalLayout_6);

_ui.confCheckBoxExternal->setVisible(false);
_ui.confCheckBoxExternal->setFixedSize(0,0);
_ui.wSyncStrategy->removeItem(_ui.horizontalLayout_8);

_ui.verticalLayout->removeWidget(_ui.errorLabel);
_ui.wSyncStrategy->insertWidget(0, _ui.errorLabel);
}

} // namespace OCC
2 changes: 1 addition & 1 deletion src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void OwncloudAdvancedSetupPage::customizeStyle()
void OwncloudAdvancedSetupPage::styleLocalFolderLabel()
{
const auto backgroundColor = palette().window().color();
const auto folderIconFileName = Theme::instance()->isBranded() ? Theme::hidpiFileName("folder.png", backgroundColor)
const auto folderIconFileName = Theme::instance()->isBranded() ? Theme::hidpiFileName("computer-icon.png", backgroundColor)
: Theme::hidpiFileName(":/client/theme/colored/folder.png");
_ui.lLocal->setPixmap(folderIconFileName);
}
Expand Down
6 changes: 5 additions & 1 deletion src/gui/wizard/owncloudadvancedsetuppage.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class OwncloudAdvancedSetupPage : public QWizardPage
void setMultipleFoldersExist(bool exist);
void directoriesCreated();

Ui_OwncloudAdvancedSetupPage ui() const;

signals:
void createLocalAndRemoteFolders(const QString &, const QString &);

Expand All @@ -64,6 +66,9 @@ private slots:
void slotVirtualFileSyncClicked();
void slotQuotaRetrieved(const QVariantMap &result);

protected:
Ui_OwncloudAdvancedSetupPage _ui{};

private:
void setRadioChecked(QRadioButton *radio);

Expand All @@ -87,7 +92,6 @@ private slots:
// TODO: remove when UX decision is made
void refreshVirtualFilesAvailibility(const QString &path);

Ui_OwncloudAdvancedSetupPage _ui{};
bool _checking = false;
bool _created = false;
bool _localFolderValid = false;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/wizard/owncloudwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void OwncloudWizard::slotCurrentPageChanged(int id)
id == WizardCommon::Page_Flow2AuthCreds) {
setButtonLayout({ QWizard::Stretch });
} else if (id == WizardCommon::Page_AdvancedSetup) {
setButtonLayout({ QWizard::CustomButton2, QWizard::Stretch, QWizard::CustomButton1, QWizard::FinishButton });
setButtonLayout({ QWizard::Stretch, QWizard::FinishButton });
setNextButtonAsDefault();
} else {
setButtonLayout({ QWizard::BackButton, QWizard::Stretch, QWizard::NextButton });
Expand Down
2 changes: 1 addition & 1 deletion src/gui/wizard/owncloudwizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public slots:

protected:
void changeEvent(QEvent *) override;
void paintEvent(QPaintEvent *event) override;
void paintEvent(QPaintEvent *event) override;

private:
void customizeStyle();
Expand Down
4 changes: 3 additions & 1 deletion theme/sync-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a558d1a

Please sign in to comment.