forked from qt-creator/qt-creator
Clean up layouts and use minisplitter everywhere
This patch replaces all uses of QSplitter with thin 1-pixel splitters. I also fixed dock widget layouts in main windows to do the same. Additionally I had to tweak the tabbars so they look good in mini splitter layouts to avoid a double left-border. Reviewed-by: thorbjorn
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtGui/QDockWidget>
|
||||
#include <QtGui/QAbstractItemView>
|
||||
|
||||
using namespace Designer::Constants;
|
||||
|
||||
@@ -59,6 +60,13 @@ EditorWidget::EditorWidget(FormEditorW *few, QWidget *parent) :
|
||||
QWidget *subWindow = subs[i];
|
||||
subWindow->setWindowTitle(subs[i]->windowTitle());
|
||||
m_designerDockWidgets[i] = addDockForWidget(subWindow);
|
||||
|
||||
// Since we have 1-pixel splitters, we generally want to remove
|
||||
// frames around item views. So we apply this hack for now.
|
||||
QList<QAbstractItemView*> frames = subWindow->findChildren<QAbstractItemView*>();
|
||||
for (int i = 0 ; i< frames.count(); ++i)
|
||||
frames[i]->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
}
|
||||
resetToDefaultLayout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user