forked from qt-creator/qt-creator
QmlEditorWidgets: Use LayoutBuilder in PreviewDialog
Change-Id: Ic00c724e0787b51b3757b92d0d87dff8a6074c52 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
#include <utils/layoutbuilder.h>
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QBoxLayout>
|
|
||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -901,11 +900,6 @@ PreviewDialog::PreviewDialog(QWidget *parent) : DragWidget(parent)
|
|||||||
|
|
||||||
setZoom(1);
|
setZoom(1);
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
|
||||||
QHBoxLayout *horizontalLayout = new QHBoxLayout();
|
|
||||||
QHBoxLayout *horizontalLayout2 = new QHBoxLayout();
|
|
||||||
layout->setContentsMargins(2, 2, 2, 16);
|
|
||||||
layout->setSpacing(4);
|
|
||||||
QToolButton *toolButton = new QToolButton(this);
|
QToolButton *toolButton = new QToolButton(this);
|
||||||
QIcon icon(style()->standardIcon(QStyle::SP_DockWidgetCloseButton));
|
QIcon icon(style()->standardIcon(QStyle::SP_DockWidgetCloseButton));
|
||||||
toolButton->setIcon(icon);
|
toolButton->setIcon(icon);
|
||||||
@@ -922,17 +916,14 @@ PreviewDialog::PreviewDialog(QWidget *parent) : DragWidget(parent)
|
|||||||
m_slider->setFixedWidth(80);
|
m_slider->setFixedWidth(80);
|
||||||
m_zoomLabel->setFixedWidth(50);
|
m_zoomLabel->setFixedWidth(50);
|
||||||
|
|
||||||
horizontalLayout->addWidget(toolButton);
|
using namespace Layouting;
|
||||||
horizontalLayout->addSpacing(6);
|
Row {
|
||||||
horizontalLayout->addWidget(m_slider);
|
Column { toolButton, st },
|
||||||
horizontalLayout->addSpacing(6);
|
Column {
|
||||||
horizontalLayout->addWidget(m_zoomLabel);
|
Row { m_slider, m_zoomLabel, st },
|
||||||
horizontalLayout->addStretch(1);
|
scrollArea,
|
||||||
|
}
|
||||||
layout->addLayout(horizontalLayout);
|
}.attachTo(this);
|
||||||
horizontalLayout2->addSpacing(24);
|
|
||||||
horizontalLayout2->addWidget(scrollArea);
|
|
||||||
layout->addLayout(horizontalLayout2);
|
|
||||||
|
|
||||||
wheelFilter->setTarget(this);
|
wheelFilter->setTarget(this);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user