forked from qt-creator/qt-creator
QmlDesigner: Use StudioQuickWidget for toolbar and statusbar
Change-Id: I0255fc7cd2a10d16fea79804af814fcc3d3417ca Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
#include "toolbar.h"
|
#include "toolbar.h"
|
||||||
#include "toolbarbackend.h"
|
#include "toolbarbackend.h"
|
||||||
|
|
||||||
|
#include <studioquickwidget.h>
|
||||||
|
|
||||||
#include <theme.h>
|
#include <theme.h>
|
||||||
#include <qmldesignerconstants.h>
|
#include <qmldesignerconstants.h>
|
||||||
|
|
||||||
@@ -18,8 +20,6 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
QmlDesigner::ToolBar::ToolBar() {}
|
|
||||||
|
|
||||||
static Utils::FilePath propertyEditorResourcesPath()
|
static Utils::FilePath propertyEditorResourcesPath()
|
||||||
{
|
{
|
||||||
#ifdef SHARE_QML_PATH
|
#ifdef SHARE_QML_PATH
|
||||||
@@ -66,7 +66,7 @@ void ToolBar::create()
|
|||||||
toolBar->setFloatable(false);
|
toolBar->setFloatable(false);
|
||||||
toolBar->setMovable(false);
|
toolBar->setMovable(false);
|
||||||
|
|
||||||
auto quickWidget = new QQuickWidget;
|
auto quickWidget = new StudioQuickWidget;
|
||||||
|
|
||||||
quickWidget->setFixedHeight(48);
|
quickWidget->setFixedHeight(48);
|
||||||
quickWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
quickWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
@@ -95,7 +95,7 @@ void ToolBar::createStatusBar()
|
|||||||
|
|
||||||
ToolBarBackend::registerDeclarativeType();
|
ToolBarBackend::registerDeclarativeType();
|
||||||
|
|
||||||
auto quickWidget = new QQuickWidget;
|
auto quickWidget = new StudioQuickWidget;
|
||||||
|
|
||||||
quickWidget->setFixedHeight(Theme::toolbarSize());
|
quickWidget->setFixedHeight(Theme::toolbarSize());
|
||||||
quickWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
quickWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
@@ -3,16 +3,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QQuickWidget>
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class ToolBar : public QQuickWidget
|
class ToolBar
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ToolBar();
|
|
||||||
static void create();
|
static void create();
|
||||||
static void createStatusBar();
|
static void createStatusBar();
|
||||||
static bool isVisible();
|
static bool isVisible();
|
||||||
|
Reference in New Issue
Block a user