[Pkg-owncloud-commits] [owncloud-client] 370/498: SettingsDialog: Make bigger and more native on OS X

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:07 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 afed400ac69742e931c409922ec1b77a74d235b0
Author: Markus Goetz <markus at woboq.com>
Date:   Mon Jul 20 18:15:45 2015 +0200

    SettingsDialog: Make bigger and more native on OS X
    
    On OS X, the width of the dialog must not change, only its height.
---
 src/gui/accountsettings.h   | 2 ++
 src/gui/generalsettings.cpp | 4 ++++
 src/gui/generalsettings.h   | 1 +
 src/gui/networksettings.cpp | 4 ++++
 src/gui/networksettings.h   | 1 +
 src/gui/owncloudgui.h       | 2 ++
 src/gui/protocolwidget.h    | 2 ++
 7 files changed, 16 insertions(+)

diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h
index 8a5a438..b20b205 100644
--- a/src/gui/accountsettings.h
+++ b/src/gui/accountsettings.h
@@ -23,6 +23,7 @@
 #include "folder.h"
 #include "quotainfo.h"
 #include "progressdispatcher.h"
+#include "owncloudgui.h"
 
 class QModelIndex;
 class QNetworkReply;
@@ -52,6 +53,7 @@ class AccountSettings : public QWidget
 public:
     explicit AccountSettings(AccountState *accountState, QWidget *parent = 0);
     ~AccountSettings();
+    QSize sizeHint() const { return ownCloudGui::settingsDialogSize(); }
 
 
 signals:
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index f9ee0c0..1122758 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -83,6 +83,10 @@ GeneralSettings::~GeneralSettings()
     delete _ui;
 }
 
+QSize GeneralSettings::sizeHint() const {
+    return QSize(ownCloudGui::settingsDialogSize().width(), QWidget::sizeHint().height());
+}
+
 void GeneralSettings::loadMiscSettings()
 {
     ConfigFile cfgFile;
diff --git a/src/gui/generalsettings.h b/src/gui/generalsettings.h
index ab21e9b..0f3d811 100644
--- a/src/gui/generalsettings.h
+++ b/src/gui/generalsettings.h
@@ -35,6 +35,7 @@ class GeneralSettings : public QWidget
 public:
     explicit GeneralSettings(QWidget *parent = 0);
     ~GeneralSettings();
+    QSize sizeHint() const;
 
 private slots:
     void saveMiscSettings();
diff --git a/src/gui/networksettings.cpp b/src/gui/networksettings.cpp
index ec67c7b..ef13a94 100644
--- a/src/gui/networksettings.cpp
+++ b/src/gui/networksettings.cpp
@@ -80,6 +80,10 @@ NetworkSettings::~NetworkSettings()
     delete _ui;
 }
 
+QSize NetworkSettings::sizeHint() const {
+    return QSize(ownCloudGui::settingsDialogSize().width(), QWidget::sizeHint().height());
+}
+
 void NetworkSettings::loadProxySettings()
 {
     // load current proxy settings
diff --git a/src/gui/networksettings.h b/src/gui/networksettings.h
index 2e18d35..9013a67 100644
--- a/src/gui/networksettings.h
+++ b/src/gui/networksettings.h
@@ -34,6 +34,7 @@ class NetworkSettings : public QWidget
 public:
     explicit NetworkSettings(QWidget *parent = 0);
     ~NetworkSettings();
+    QSize sizeHint() const;
 
 private slots:
     void saveProxySettings();
diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h
index 7654c40..003c6b1 100644
--- a/src/gui/owncloudgui.h
+++ b/src/gui/owncloudgui.h
@@ -23,6 +23,7 @@
 #include <QAction>
 #include <QMenu>
 #include <QSignalMapper>
+#include <QSize>
 
 namespace OCC {
 
@@ -48,6 +49,7 @@ public:
     bool checkAccountExists(bool openSettings);
 
     static void raiseDialog(QWidget *raiseWidget);
+    static QSize settingsDialogSize() { return QSize(800, 500); }
     void setupOverlayIcons();
 
 signals:
diff --git a/src/gui/protocolwidget.h b/src/gui/protocolwidget.h
index 1a688a1..a74ab54 100644
--- a/src/gui/protocolwidget.h
+++ b/src/gui/protocolwidget.h
@@ -19,6 +19,7 @@
 #include <QLocale>
 
 #include "progressdispatcher.h"
+#include "owncloudgui.h"
 
 #include "ui_protocolwidget.h"
 
@@ -42,6 +43,7 @@ class ProtocolWidget : public QWidget
 public:
     explicit ProtocolWidget(QWidget *parent = 0);
     ~ProtocolWidget();
+    QSize sizeHint() const { return ownCloudGui::settingsDialogSize(); }
 
 public slots:
     void slotProgressInfo( const QString& folder, const ProgressInfo& progress );

-- 
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