[Pkg-owncloud-commits] [owncloud-client] 43/120: SettingsDialog: Use separator instead of custom spacer
Sandro Knauß
hefee-guest at moszumanska.debian.org
Mon Aug 24 00:02:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 3267c15affe4572472ac13e9290e2ce65679749d
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Tue Aug 11 21:44:35 2015 +0200
SettingsDialog: Use separator instead of custom spacer
... and make sure to hide if when there are no accounts
---
src/gui/settingsdialog.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp
index a231552..f8a0fe8 100644
--- a/src/gui/settingsdialog.cpp
+++ b/src/gui/settingsdialog.cpp
@@ -81,9 +81,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
setWindowTitle(Theme::instance()->appNameGUI());
// Add a spacer so config buttons are right aligned and account buttons will be left aligned
- auto spacer = new QWidget();
- spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- _toolBar->addWidget(spacer);
+ _seperatorAction = _toolBar->addSeparator();
_actionGroup = new QActionGroup(this);
_actionGroup->setExclusive(true);
@@ -207,6 +205,8 @@ void SettingsDialog::accountAdded(AccountState *s)
connect( accountSettings, SIGNAL(folderChanged()), _gui, SLOT(slotFoldersChanged()));
connect( accountSettings, SIGNAL(openFolderAlias(const QString&)),
_gui, SLOT(slotFolderOpenAction(QString)));
+
+ _seperatorAction->setVisible(!_toolbarAccountActions.isEmpty());
}
void SettingsDialog::accountRemoved(AccountState *s)
@@ -226,6 +226,8 @@ void SettingsDialog::accountRemoved(AccountState *s)
break;
}
}
+
+ _seperatorAction->setVisible(!_toolbarAccountActions.isEmpty());
}
void SettingsDialog::customizeStyle()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list