forked from qt-creator/qt-creator
QmlDesigner: Adding a toolbar
* Icons are not the final ones. * I fixed a couple of glitches and cleaned up the code. - Action for copy and paste/delete were not properly updated - Delete had no icon - Using std::function for action predicates and operations - The context menu has no icons. This way we avoid having to define 2 icons. Change-Id: Ic23cbc78ba299c19e07e8de775eb813aae55db9b Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "designmodewidget.h"
|
||||
|
||||
#include <designeractionmanager.h>
|
||||
|
||||
#include <coreplugin/outputpane.h>
|
||||
#include "qmldesignerplugin.h"
|
||||
#include "crumblebar.h"
|
||||
@@ -299,7 +301,14 @@ void DesignModeWidget::setup()
|
||||
QToolBar *toolBar = new QToolBar;
|
||||
toolBar->addAction(viewManager().componentViewAction());
|
||||
toolBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
m_toolBar->addCenterToolBar(toolBar);
|
||||
DesignerActionToolBar *designerToolBar = QmlDesignerPlugin::instance()->viewManager().designerActionManager().createToolBar(m_toolBar);
|
||||
|
||||
QmlDesignerPlugin::instance()->viewManager().designerActionManager().polishActions();
|
||||
designerToolBar->layout()->addWidget(toolBar);
|
||||
|
||||
m_toolBar->addCenterToolBar(designerToolBar);
|
||||
|
||||
m_toolBar->setMinimumWidth(320);
|
||||
|
||||
m_mainSplitter = new MiniSplitter(this);
|
||||
m_mainSplitter->setObjectName("mainSplitter");
|
||||
|
||||
Reference in New Issue
Block a user