summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/designer/src/designer/qdesigner_toolwindow.cpp8
-rw-r--r--src/designer/src/designer/qdesigner_workbench.cpp4
-rw-r--r--src/designer/src/designer/qdesigner_workbench.h2
3 files changed, 2 insertions, 12 deletions
diff --git a/src/designer/src/designer/qdesigner_toolwindow.cpp b/src/designer/src/designer/qdesigner_toolwindow.cpp
index dc65a8f46..9919b1a86 100644
--- a/src/designer/src/designer/qdesigner_toolwindow.cpp
+++ b/src/designer/src/designer/qdesigner_toolwindow.cpp
@@ -32,6 +32,8 @@ bool ToolWindowFontSettings::equals(const ToolWindowFontSettings &rhs) const
m_font == rhs.m_font;
}
+static constexpr int margin = 20;
+
// ---------------- QDesignerToolWindow
QDesignerToolWindow::QDesignerToolWindow(QDesignerWorkbench *workbench,
QWidget *w,
@@ -156,7 +158,6 @@ PropertyEditorToolWindow::PropertyEditorToolWindow(QDesignerWorkbench *workbench
QRect PropertyEditorToolWindow::geometryHint() const
{
const QRect g = availableToolWindowGeometry();
- const int margin = workbench()->marginHint();
const int spacing = 40;
const QSize sz(g.width() * 1/4, g.height() * 4/6);
@@ -208,7 +209,6 @@ ActionEditorToolWindow::ActionEditorToolWindow(QDesignerWorkbench *workbench) :
QRect ActionEditorToolWindow::geometryHint() const
{
const QRect g = availableToolWindowGeometry();
- const int margin = workbench()->marginHint();
const QSize sz(g.width() * 1/4, g.height() * 1/6);
@@ -250,7 +250,6 @@ ObjectInspectorToolWindow::ObjectInspectorToolWindow(QDesignerWorkbench *workben
QRect ObjectInspectorToolWindow::geometryHint() const
{
const QRect g = availableToolWindowGeometry();
- const int margin = workbench()->marginHint();
const QSize sz(g.width() * 1/4, g.height() * 1/6);
@@ -285,7 +284,6 @@ ResourceEditorToolWindow::ResourceEditorToolWindow(QDesignerWorkbench *workbench
QRect ResourceEditorToolWindow::geometryHint() const
{
const QRect g = availableToolWindowGeometry();
- const int margin = workbench()->marginHint();
const QSize sz(g.width() * 1/3, g.height() * 1/6);
QRect r(QPoint(0, 0), sz);
@@ -319,7 +317,6 @@ SignalSlotEditorToolWindow::SignalSlotEditorToolWindow(QDesignerWorkbench *workb
QRect SignalSlotEditorToolWindow::geometryHint() const
{
const QRect g = availableToolWindowGeometry();
- const int margin = workbench()->marginHint();
const QSize sz(g.width() * 1/3, g.height() * 1/6);
QRect r(QPoint(0, 0), sz);
@@ -360,7 +357,6 @@ WidgetBoxToolWindow::WidgetBoxToolWindow(QDesignerWorkbench *workbench) :
QRect WidgetBoxToolWindow::geometryHint() const
{
const QRect g = availableToolWindowGeometry();
- const int margin = workbench()->marginHint();
const QRect rc = QRect(g.left() + margin,
g.top() + margin,
g.width() * 1/4, g.height() * 5/6);
diff --git a/src/designer/src/designer/qdesigner_workbench.cpp b/src/designer/src/designer/qdesigner_workbench.cpp
index e6970b418..97d97f96d 100644
--- a/src/designer/src/designer/qdesigner_workbench.cpp
+++ b/src/designer/src/designer/qdesigner_workbench.cpp
@@ -571,10 +571,6 @@ QRect QDesignerWorkbench::availableGeometry() const
return screen ? screen->availableGeometry() : QGuiApplication::primaryScreen()->availableGeometry() ;
}
-int QDesignerWorkbench::marginHint() const
-{ return 20;
-}
-
void QDesignerWorkbench::slotFormWindowActivated(QDesignerFormWindow* fw)
{
core()->formWindowManager()->setActiveFormWindow(fw->editor());
diff --git a/src/designer/src/designer/qdesigner_workbench.h b/src/designer/src/designer/qdesigner_workbench.h
index faf735e88..7c10ed227 100644
--- a/src/designer/src/designer/qdesigner_workbench.h
+++ b/src/designer/src/designer/qdesigner_workbench.h
@@ -67,8 +67,6 @@ public:
QRect availableGeometry() const;
QRect desktopGeometry() const;
- int marginHint() const;
-
bool readInForm(const QString &fileName) const;
bool writeOutForm(QDesignerFormWindowInterface *formWindow, const QString &fileName) const;
bool saveForm(QDesignerFormWindowInterface *fw);