Browse Source

ui improvement

cl-refactor
yann300 10 years ago
parent
commit
518ef9c18b
  1. 4
      mix/AppContext.cpp
  2. 2
      mix/qml/CommonSeparator.qml
  3. 5
      mix/qml/DefaultLabel.qml
  4. 2
      mix/qml/StateDialog.qml
  5. 7
      mix/qml/Style.qml
  6. 1
      mix/qml/TransactionDialog.qml

4
mix/AppContext.cpp

@ -60,6 +60,8 @@ AppContext::~AppContext()
void AppContext::load()
{
m_applicationEngine->rootContext()->setContextProperty("appContext", this);
QFont f;
m_applicationEngine->rootContext()->setContextProperty("systemPointSize", f.pointSize());
qmlRegisterType<FileIo>("org.ethereum.qml", 1, 0, "FileIo");
m_applicationEngine->rootContext()->setContextProperty("codeModel", m_codeModel.get());
m_applicationEngine->rootContext()->setContextProperty("fileIo", m_fileIo.get());
@ -81,8 +83,6 @@ void AppContext::load()
BOOST_THROW_EXCEPTION(exception);
}
m_applicationEngine->rootContext()->setContextProperty("projectModel", projectModel);
QFont f;
m_applicationEngine->rootContext()->setContextProperty("systemPointSize", f.pointSize());
qmlRegisterType<CodeEditorExtensionManager>("CodeEditorExtensionManager", 1, 0, "CodeEditorExtensionManager");
qmlRegisterType<HttpServer>("HttpServer", 1, 0, "HttpServer");
m_applicationEngine->load(QUrl("qrc:/qml/main.qml"));

2
mix/qml/CommonSeparator.qml

@ -3,7 +3,7 @@ import "."
Rectangle
{
height: 3
height: 1
color: Style.generic.layout.separatorColor
}

5
mix/qml/DefaultLabel.qml

@ -1,11 +1,12 @@
import QtQuick 2.0
import QtQuick.Controls 1.1
import "."
Label {
text: text
font.family: regularFont.name
SourceSansProRegular
font.pointSize: Style.generic.size.titlePointSize
SourceSansProLight
{
id: regularFont
}

2
mix/qml/StateDialog.qml

@ -132,6 +132,7 @@ Window {
spacing: 0
RowLayout
{
Layout.preferredWidth: 150
DefaultLabel {
text: qsTr("Transactions: ")
}
@ -142,6 +143,7 @@ Window {
action: newTrAction
width: 10
height: 10
anchors.right: parent.right
}
Action {

7
mix/qml/Style.qml

@ -9,8 +9,11 @@ QtObject {
}
property QtObject generic: QtObject {
property QtObject layout : QtObject {
property string separatorColor: "#f7f7f7"
property QtObject layout: QtObject {
property string separatorColor: "#808080"
}
property QtObject size: QtObject {
property string titlePointSize: absoluteSize(0)
}
}
}

1
mix/qml/TransactionDialog.qml

@ -424,6 +424,7 @@ Window {
CommonSeparator
{
Layout.fillWidth: true
visible: paramsModel.count > 0
}
}

Loading…
Cancel
Save