Skip to content

Commit

Permalink
Move qml.qrc and qtquickcontrols2.conf from root to atomic_defi_desig…
Browse files Browse the repository at this point in the history
…n folder
  • Loading branch information
syl committed Sep 21, 2021
1 parent 9183b61 commit 6c286e6
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 574 deletions.
562 changes: 562 additions & 0 deletions atomic_defi_design/qml.qrc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion atomic_defi_design/qml/Constants/General.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ QtObject {

readonly property string os_file_prefix: Qt.platform.os == "windows" ? "file:///" : "file://"
readonly property string assets_path: "qrc:///"
readonly property string image_path: assets_path + "atomic_defi_design/assets/images/"
readonly property string image_path: assets_path + "assets/images/"
readonly property string coin_icons_path: image_path + "coins/"
readonly property string custom_coin_icons_path: os_file_prefix + API.app.settings_pg.get_custom_coins_icons_path() + "/"
readonly property string providerIconsPath: image_path + "providers/"
Expand Down
2 changes: 1 addition & 1 deletion atomic_defi_design/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ DexWindow
spacing: 5

Image {
source: "qrc:/atomic_defi_design/assets/images/dex-tray-icon.png"
source: "qrc:/assets/images/dex-tray-icon.png"
width: 15
height: 15
smooth: true
Expand Down
File renamed without changes.
562 changes: 0 additions & 562 deletions qml.qrc

This file was deleted.

2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ add_executable(${PROJECT_NAME}
${CMAKE_SOURCE_DIR}/cmake/install/windows/dex.rc

##! QRC
${CMAKE_SOURCE_DIR}/qml.qrc
${CMAKE_SOURCE_DIR}/atomic_defi_design/qml.qrc

##! Linguistic
${QM_FILES}
Expand Down
18 changes: 9 additions & 9 deletions src/app/main.prerequisites.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ run_app(int argc, char** argv)
QtWebEngine::initialize();
std::shared_ptr<QApplication> app = std::make_shared<QApplication>(argc, argv);

app->setWindowIcon(QIcon(":/atomic_defi_design/assets/images/logo/dex-logo.png"));
app->setWindowIcon(QIcon(":/assets/images/logo/dex-logo.png"));
app->setOrganizationName("KomodoPlatform");
app->setOrganizationDomain("com");
QQmlApplicationEngine engine;
Expand Down Expand Up @@ -445,13 +445,13 @@ run_app(int argc, char** argv)
// SPDLOG_INFO("{}", QQuickStyle::ge))
SPDLOG_INFO("Qaterial type created");

engine.addImportPath("qrc:/atomic_defi_design/imports");
engine.addImportPath("qrc:/atomic_defi_design/Constants");
qmlRegisterSingletonType(QUrl("qrc:/atomic_defi_design/qml/Constants/DexTheme.qml"), "App", 1, 0, "DexTheme");
qmlRegisterSingletonType(QUrl("qrc:/atomic_defi_design/qml/Constants/DexTypo.qml"), "App", 1, 0, "DexTypo");
qmlRegisterSingletonType(QUrl("qrc:/atomic_defi_design/qml/Constants/General.qml"), "App", 1, 0, "General");
qmlRegisterSingletonType(QUrl("qrc:/atomic_defi_design/qml/Constants/Style.qml"), "App", 1, 0, "Style");
qmlRegisterSingletonType(QUrl("qrc:/atomic_defi_design/qml/Constants/API.qml"), "App", 1, 0, "API");
engine.addImportPath("qrc:/imports");
engine.addImportPath("qrc:/Constants");
qmlRegisterSingletonType(QUrl("qrc:/qml/Constants/DexTheme.qml"), "App", 1, 0, "DexTheme");
qmlRegisterSingletonType(QUrl("qrc:/qml/Constants/DexTypo.qml"), "App", 1, 0, "DexTypo");
qmlRegisterSingletonType(QUrl("qrc:/qml/Constants/General.qml"), "App", 1, 0, "General");
qmlRegisterSingletonType(QUrl("qrc:/qml/Constants/Style.qml"), "App", 1, 0, "Style");
qmlRegisterSingletonType(QUrl("qrc:/qml/Constants/API.qml"), "App", 1, 0, "API");
qRegisterMetaType<t_portfolio_roles>("PortfolioRoles");
SPDLOG_INFO("QML singleton created");

Expand All @@ -468,7 +468,7 @@ run_app(int argc, char** argv)
#else
SPDLOG_INFO("Load qml engine");
engine.rootContext()->setContextProperty("debug_bar", QVariant(false));
const QUrl url(QStringLiteral("qrc:/atomic_defi_design/qml/main.qml"));
const QUrl url(QStringLiteral("qrc:/qml/main.qml"));
QObject::connect(
&engine, &QQmlApplicationEngine::objectCreated, app.get(),
[url](QObject* obj, const QUrl& objUrl)
Expand Down

0 comments on commit 6c286e6

Please sign in to comment.