Browse Source

- ApplicationCtx.h: refactor of singleton (put inline code in *.h).

- Coding standards (#pragma once, ...).
 - CodeEditorExtensionManager.cpp: replace normal pointer by shared_ptr.
 - Add namespace dev::mix.
 - MixApplication: will be used to catch exception (not used now).
cl-refactor
yann300 10 years ago
parent
commit
0a496d7725
  1. 37
      mix/ApplicationCtx.cpp
  2. 30
      mix/ApplicationCtx.h
  3. 66
      mix/CodeEditorExtensionManager.cpp
  4. 24
      mix/CodeEditorExtensionManager.h
  5. 48
      mix/ConstantCompilationCtrl.cpp
  6. 35
      mix/ConstantCompilationCtrl.h
  7. 41
      mix/ConstantCompilationModel.cpp
  8. 44
      mix/ConstantCompilationModel.h
  9. 43
      mix/Extension.cpp
  10. 26
      mix/Extension.h
  11. 42
      mix/MixApplication.cpp
  12. 46
      mix/MixApplication.h
  13. 17
      mix/main.cpp
  14. 1
      mix/qml/BasicContent.qml
  15. 2
      mix/qml/MainContent.qml
  16. 1
      mix/qml/TabStyle.qml
  17. 1
      mix/qml/main.qml

37
mix/ApplicationCtx.cpp

@ -1,55 +1,30 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file ApplicationCtx.cpp
* @author Yann yann@ethdev.com
* @date 2014
* Ethereum IDE client.
* Provide an access to the current QQmlApplicationEngine which is used to add QML file on the fly.
* In the future this class can be extended to add more variable related to the context of the application.
*/
#include "ApplicationCtx.h"
#include <QQmlApplicationEngine>
#include "ApplicationCtx.h"
using namespace dev::mix;
ApplicationCtx* ApplicationCtx::m_instance = nullptr;
ApplicationCtx::ApplicationCtx(QQmlApplicationEngine* _engine)
{
m_applicationEngine = _engine;
}
ApplicationCtx::~ApplicationCtx()
{
delete m_applicationEngine;
}
ApplicationCtx* ApplicationCtx::GetInstance()
{
return m_instance;
}
ApplicationCtx* ApplicationCtx::Instance = nullptr;
void ApplicationCtx::SetApplicationContext(QQmlApplicationEngine* engine)
QQmlApplicationEngine* ApplicationCtx::appEngine()
{
m_instance = new ApplicationCtx(engine);
}
QQmlApplicationEngine* ApplicationCtx::appEngine(){
return m_applicationEngine;
}
void ApplicationCtx::QuitApplication()
{
delete m_instance;
}

30
mix/ApplicationCtx.h

@ -17,29 +17,39 @@
/** @file ApplicationCtx.h
* @author Yann yann@ethdev.com
* @date 2014
* Ethereum IDE client.
* Provide an access to the current QQmlApplicationEngine which is used to add QML file on the fly.
* In the future this class can be extended to add more variable related to the context of the application.
*/
#ifndef APPLICATIONCONTEXT_H
#define APPLICATIONCONTEXT_H
#pragma once
#include <QQmlApplicationEngine>
namespace dev
{
namespace mix
{
class ApplicationCtx : public QObject
{
Q_OBJECT
public:
ApplicationCtx(QQmlApplicationEngine*);
~ApplicationCtx();
ApplicationCtx(QQmlApplicationEngine* _engine) { m_applicationEngine = _engine; }
~ApplicationCtx() { delete m_applicationEngine; }
static ApplicationCtx* getInstance() { return Instance; }
static void setApplicationContext(QQmlApplicationEngine* _engine) { Instance = new ApplicationCtx(_engine); }
QQmlApplicationEngine* appEngine();
static ApplicationCtx* GetInstance();
static void SetApplicationContext(QQmlApplicationEngine*);
private:
static ApplicationCtx* m_instance;
static ApplicationCtx* Instance;
QQmlApplicationEngine* m_applicationEngine;
public slots:
void QuitApplication();
void quitApplication() { delete Instance; }
};
#endif // APPLICATIONCTX_H
}
}

66
mix/CodeEditorExtensionMan.cpp → mix/CodeEditorExtensionManager.cpp

@ -27,64 +27,66 @@
#include <QtDeclarative/QDeclarativeView>
#include <QQmlComponent>
#include <QQuickTextDocument>
#include "CodeEditorExtensionMan.h"
#include <libevm/VM.h>
#include "ConstantCompilationCtrl.h"
#include "features.h"
#include "ApplicationCtx.h"
#include <libevm/VM.h>
using namespace dev;
#include "CodeEditorExtensionManager.h"
using namespace dev::mix;
CodeEditorExtensionMan::CodeEditorExtensionMan()
{
}
CodeEditorExtensionMan::~CodeEditorExtensionMan()
CodeEditorExtensionManager::~CodeEditorExtensionManager()
{
for (int k = 0; k < m_features.length(); k++){
delete m_features.at(k);
}
m_features.clear();
}
void CodeEditorExtensionMan::loadEditor(QQuickItem* _editor)
void CodeEditorExtensionManager::loadEditor(QQuickItem* _editor)
{
if (!_editor)
return;
try{
try
{
QVariant doc = _editor->property("textDocument");
if (doc.canConvert<QQuickTextDocument*>()) {
if (doc.canConvert<QQuickTextDocument*>())
{
QQuickTextDocument* qqdoc = doc.value<QQuickTextDocument*>();
if (qqdoc) {
if (qqdoc)
m_doc = qqdoc->textDocument();
}
}
}
catch (dev::Exception const& exception){
catch (...)
{
qDebug() << "unable to load editor: ";
qDebug() << exception.what();
}
}
void CodeEditorExtensionMan::initExtensions()
void CodeEditorExtensionManager::initExtensions()
{
try{
//only one for now
ConstantCompilation* m_constantCompilation = new ConstantCompilation(m_doc);
if (m_constantCompilation->tabUrl() != "")
m_constantCompilation->addContentOn(m_tabView);
m_constantCompilation->start();
m_features.append(m_constantCompilation);
}
catch (dev::Exception const& exception){
qDebug() << "unable to load extensions: ";
qDebug() << exception.what();
//only one for now
std::shared_ptr<ConstantCompilationCtrl> m_constantCompilation(new ConstantCompilationCtrl(m_doc));
ConstantCompilationCtrl* ext = m_constantCompilation.get();
if (ext->contentUrl() != "")
{
try
{
ext->addContentOn(m_tabView);
}
catch (...)
{
qDebug() << "Exception when adding content into view.";
return;
}
}
ext->start();
m_features.append(m_constantCompilation);
}
void CodeEditorExtensionMan::setEditor(QQuickItem* _editor){
void CodeEditorExtensionManager::setEditor(QQuickItem* _editor)
{
this->loadEditor(_editor);
this->initExtensions();
}
void CodeEditorExtensionMan::setTabView(QQuickItem* _tabView){
void CodeEditorExtensionManager::setTabView(QQuickItem* _tabView)
{
m_tabView = _tabView;
}

24
mix/CodeEditorExtensionMan.h → mix/CodeEditorExtensionManager.h

@ -20,15 +20,21 @@
* Ethereum IDE client.
*/
#ifndef CODEEDITOREXTENSIONMAN_H
#define CODEEDITOREXTENSIONMAN_H
#pragma once
#include "memory"
#include <QQuickItem>
#include <QTextDocument>
#include <QVector>
#include "Feature.h"
#include "ConstantCompilationCtrl.h"
class CodeEditorExtensionMan : public QObject
namespace dev
{
namespace mix
{
class CodeEditorExtensionManager : public QObject
{
Q_OBJECT
@ -36,18 +42,20 @@ class CodeEditorExtensionMan : public QObject
Q_PROPERTY(QQuickItem* tabView MEMBER m_tabView WRITE setTabView)
public:
CodeEditorExtensionMan();
~CodeEditorExtensionMan();
CodeEditorExtensionManager() {}
~CodeEditorExtensionManager();
void initExtensions();
void setEditor(QQuickItem*);
void setTabView(QQuickItem*);
private:
QQuickItem* m_editor;
QVector<Feature*> m_features;
QVector<std::shared_ptr<ConstantCompilationCtrl>> m_features;
QQuickItem* m_tabView;
QTextDocument* m_doc;
void loadEditor(QQuickItem*);
};
#endif // CODEEDITOREXTENSIONMAN_H
}
}

48
mix/ConstantCompilationCtrl.cpp

@ -20,53 +20,55 @@
* Ethereum IDE client.
*/
#include "ConstantCompilationCtrl.h"
#include "ConstantCompilationModel.h"
#include <QQuickItem>
#include <QtCore/QFileInfo>
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QtCore/QtCore>
#include <QDebug>
#include "ConstantCompilationCtrl.h"
#include "ConstantCompilationModel.h"
using namespace dev::mix;
ConstantCompilation::ConstantCompilation(QTextDocument* _doc)
ConstantCompilationCtrl::ConstantCompilationCtrl(QTextDocument* _doc)
{
m_editor = _doc;
compilationModel = new ConstantCompilationModel();
m_compilationModel = new ConstantCompilationModel();
}
ConstantCompilation::~ConstantCompilation()
ConstantCompilationCtrl::~ConstantCompilationCtrl()
{
delete compilationModel;
delete m_compilationModel;
}
QString ConstantCompilation::tabUrl()
QString ConstantCompilationCtrl::contentUrl() const
{
return QStringLiteral("qrc:/qml/BasicContent.qml");
}
QString ConstantCompilation::title()
QString ConstantCompilationCtrl::title() const
{
return "compiler";
}
void ConstantCompilation::start()
void ConstantCompilationCtrl::start() const
{
connect(m_editor, SIGNAL(contentsChange(int,int,int)), this, SLOT(compile()));
}
void ConstantCompilation::compile()
void ConstantCompilationCtrl::compile()
{
QString codeContent = m_editor->toPlainText().replace("\n", "");
if (codeContent == ""){
if (codeContent == "")
{
resetOutPut();
return;
}
compilerResult res = compilationModel->compile(m_editor->toPlainText());
CompilerResult res = m_compilationModel->compile(m_editor->toPlainText());
writeOutPut(res);
}
void ConstantCompilation::resetOutPut()
void ConstantCompilationCtrl::resetOutPut()
{
QObject* status = m_view->findChild<QObject*>("status", Qt::FindChildrenRecursively);
QObject* content = m_view->findChild<QObject*>("content", Qt::FindChildrenRecursively);
@ -74,24 +76,22 @@ void ConstantCompilation::resetOutPut()
content->setProperty("text", "");
}
void ConstantCompilation::writeOutPut(compilerResult res)
void ConstantCompilationCtrl::writeOutPut(CompilerResult _res)
{
QObject* status = m_view->findChild<QObject*>("status", Qt::FindChildrenRecursively);
QObject* content = m_view->findChild<QObject*>("content", Qt::FindChildrenRecursively);
if (res.success){
if (_res.success)
{
status->setProperty("text", "succeeded");
status->setProperty("color", "green");
content->setProperty("text", res.hexCode);
qDebug() << QString("compile succeeded " + res.hexCode);
content->setProperty("text", _res.hexCode);
qDebug() << QString("compile succeeded " + _res.hexCode);
}
else {
else
{
status->setProperty("text", "failure");
status->setProperty("color", "red");
content->setProperty("text", res.comment);
qDebug() << QString("compile failed " + res.comment);
content->setProperty("text", _res.comment);
qDebug() << QString("compile failed " + _res.comment);
}
}

35
mix/ConstantCompilationCtrl.h

@ -1,16 +1,13 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
@ -20,33 +17,39 @@
* Ethereum IDE client.
*/
#ifndef CONSTANTCOMPILATION_H
#define CONSTANTCOMPILATION_H
#pragma once
#include <QTextDocument>
#include "ConstantCompilationModel.h"
#include "Feature.h"
#include "Extension.h"
namespace dev
{
class ConstantCompilation : public Feature
namespace mix
{
class ConstantCompilationCtrl : public Extension
{
Q_OBJECT
public:
ConstantCompilation(QTextDocument* doc);
~ConstantCompilation();
void start() override;
QString title() override;
QString tabUrl() override;
ConstantCompilationCtrl(QTextDocument*);
~ConstantCompilationCtrl();
void start() const override;
QString title() const override;
QString contentUrl() const override;
private:
QTextDocument* m_editor;
ConstantCompilationModel* compilationModel;
void writeOutPut(compilerResult);
ConstantCompilationModel* m_compilationModel;
void writeOutPut(CompilerResult);
void resetOutPut();
public Q_SLOTS:
void compile();
};
#endif // CONSTANTCOMPILATION_H
}
}

41
mix/ConstantCompilationModel.cpp

@ -1,34 +1,52 @@
#include "ConstantCompilationModel.h"
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file ApplicationCtx.h
* @author Yann yann@ethdev.com
* @date 2014
* Ethereum IDE client.
*/
#include <QObject>
#include <libevm/VM.h>
#include <libsolidity/Scanner.h>
#include <libsolidity/CompilerStack.h>
#include <libsolidity/SourceReferenceFormatter.h>
#include "ConstantCompilationModel.h"
using namespace std;
using namespace dev;
using namespace dev::eth;
using namespace dev::mix;
ConstantCompilationModel::ConstantCompilationModel()
{
}
compilerResult ConstantCompilationModel::compile(QString code)
CompilerResult ConstantCompilationModel::compile(QString _code)
{
dev::solidity::CompilerStack compiler;
dev::bytes m_data;
compilerResult res;
CompilerResult res;
try
{
m_data = compiler.compile(code.toStdString(), true);
m_data = compiler.compile(_code.toStdString(), true);
res.success = true;
res.comment = "ok";
res.hexCode = QString::fromStdString(dev::eth::disassemble(m_data));
}
catch (dev::Exception const& exception)
catch (dev::Exception const& _exception)
{
ostringstream error;
solidity::SourceReferenceFormatter::printExceptionInformation(error, exception, "Error", compiler.getScanner());
solidity::SourceReferenceFormatter::printExceptionInformation(error, _exception, "Error", compiler.getScanner());
res.success = false;
res.comment = QString::fromStdString(error.str()).toHtmlEscaped();
res.hexCode = "";
@ -41,4 +59,3 @@ compilerResult ConstantCompilationModel::compile(QString code)
}
return res;
}

44
mix/ConstantCompilationModel.h

@ -1,8 +1,37 @@
#ifndef CONSTANTCOMPILATIONMODEL_H
#define CONSTANTCOMPILATIONMODEL_H
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file ApplicationCtx.h
* @author Yann yann@ethdev.com
* @date 2014
* Ethereum IDE client.
*/
#pragma once
#include <QObject>
struct compilerResult{
namespace dev
{
namespace mix
{
struct CompilerResult
{
QString hexCode;
QString comment;
bool success;
@ -12,8 +41,11 @@ class ConstantCompilationModel
{
public:
ConstantCompilationModel();
compilerResult compile(QString code);
ConstantCompilationModel() { }
~ConstantCompilationModel() { }
CompilerResult compile(QString code);
};
#endif // CONSTANTCOMPILATIONMODEL_H
}
}

43
mix/Feature.cpp → mix/Extension.cpp

@ -1,16 +1,13 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
@ -20,36 +17,28 @@
* Ethereum IDE client.
*/
#include "Feature.h"
#include "ApplicationCtx.h"
#include <libevm/VM.h>
#include <QMessageBox>
#include <QDebug>
#include <libevm/VM.h>
#include "Extension.h"
#include "ApplicationCtx.h"
using namespace dev;
using namespace dev::mix;
Feature::Feature()
void Extension::addContentOn(QObject* _tabView)
{
}
if (contentUrl() == "")
return;
void Feature::addContentOn(QObject* tabView) {
try{
if (tabUrl() == "")
return;
QVariant returnValue;
QQmlComponent* component = new QQmlComponent(
ApplicationCtx::getInstance()->appEngine(),
QUrl(this->contentUrl()), _tabView);
QVariant returnValue;
QQmlComponent* component = new QQmlComponent(
ApplicationCtx::GetInstance()->appEngine(),
QUrl(this->tabUrl()), tabView);
QMetaObject::invokeMethod(_tabView, "addTab",
Q_RETURN_ARG(QVariant, returnValue),
Q_ARG(QVariant, this->title()),
Q_ARG(QVariant, QVariant::fromValue(component)));
QMetaObject::invokeMethod(tabView, "addTab",
Q_RETURN_ARG(QVariant, returnValue),
Q_ARG(QVariant, this->title()),
Q_ARG(QVariant, QVariant::fromValue(component)));
m_view = qvariant_cast<QObject*>(returnValue);
}
catch (dev::Exception const& exception){
qDebug() << exception.what();
}
m_view = qvariant_cast<QObject*>(returnValue);
}

26
mix/Feature.h → mix/Extension.h

@ -1,16 +1,13 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
@ -20,25 +17,32 @@
* Ethereum IDE client.
*/
#ifndef FEATURE_H
#define FEATURE_H
#pragma once
#include <QApplication>
#include <QQmlComponent>
class Feature : public QObject
namespace dev
{
namespace mix
{
class Extension : public QObject
{
Q_OBJECT
public:
Feature();
virtual QString tabUrl() { return ""; }
virtual QString title() { return ""; }
virtual void start() {}
Extension() {}
virtual QString contentUrl() const { return ""; }
virtual QString title() const { return ""; }
virtual void start() const {}
void addContentOn(QObject* tabView);
protected:
QObject* m_view;
};
#endif // FEATURE_H
}
}

42
mix/MixApplication.cpp

@ -0,0 +1,42 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file main.cpp
* @author Yann yann@ethdev.com
* @date 2014
*/
#include <QDebug>
#include "MixApplication.h"
using namespace dev::mix;
MixApplication::MixApplication(int _argc, char *_argv[])
: QApplication(_argc, _argv)
{
}
bool MixApplication::notify(QObject* _receiver, QEvent* _event)
{
try
{
return MixApplication::notify(_receiver, _event);
}
catch (std::exception& _ex)
{
qDebug() << "std::exception was caught " << _ex.what();
}
return false;
}

46
mix/MixApplication.h

@ -0,0 +1,46 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file main.cpp
* @author Yann yann@ethdev.com
* @date 2014
* This class will be use instead of QApplication to launch the application. the method 'notify' allows to catch all exceptions.
* Not use for now: TODO.
*/
#pragma once
#include <QApplication>
namespace dev
{
namespace mix
{
class MixApplication : public QApplication
{
Q_OBJECT
public:
MixApplication(int _argc, char* _argv[]);
virtual ~MixApplication() { }
virtual bool notify(QObject* _receiver, QEvent* _event);
};
}
}

17
mix/main.cpp

@ -23,19 +23,18 @@
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQuickItem>
#include "CodeEditorExtensionMan.h"
#include "CodeEditorExtensionManager.h"
#include "ApplicationCtx.h"
#include "MixApplication.h"
using namespace dev::mix;
int main(int argc, char *argv[])
int main(int _argc, char *_argv[])
{
QApplication app(argc, argv);
QApplication app(_argc, _argv);
qmlRegisterType<CodeEditorExtensionManager>("CodeEditorExtensionManager", 1, 0, "CodeEditorExtensionManager");
QQmlApplicationEngine* engine = new QQmlApplicationEngine();
qmlRegisterType<CodeEditorExtensionMan>("CodeEditorExtensionManager", 1, 0, "CodeEditorExtensionManager");
ApplicationCtx::SetApplicationContext(engine);
QObject::connect(&app, SIGNAL(lastWindowClosed()), ApplicationCtx::GetInstance(), SLOT(QuitApplication())); //use to kill ApplicationContext and other stuff
ApplicationCtx::setApplicationContext(engine);
QObject::connect(&app, SIGNAL(lastWindowClosed()), ApplicationCtx::getInstance(), SLOT(quitApplication())); //use to kill ApplicationContext and other stuff
engine->load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
return app.exec();
}

1
mix/qml/BasicContent.qml

@ -6,6 +6,7 @@ Rectangle {
width: parent.width
height: parent.height
color: "lightgray"
Text {
font.pointSize: 7
anchors.left: parent.left

2
mix/qml/MainContent.qml

@ -13,7 +13,7 @@ Rectangle {
anchors.fill: parent
orientation: Qt.Vertical
Rectangle {
anchors.top : parent.top
anchors.top: parent.top
id: contentView
width: parent.width
height: parent.height * 0.7

1
mix/qml/TabStyle.qml

@ -8,7 +8,6 @@ TabViewStyle {
color: "lightgray"
}
tab: Rectangle {
color: "lightsteelblue"
implicitWidth: Math.max(text.width + 4, 80)
implicitHeight: 20

1
mix/qml/main.qml

@ -4,7 +4,6 @@ import QtQuick.Controls.Styles 1.2
import CodeEditorExtensionManager 1.0
ApplicationWindow {
visible: true
width: 1000
height: 480

Loading…
Cancel
Save