feat: use qresources for node icons
This commit is contained in:
@@ -6,6 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
# set exec names
|
# set exec names
|
||||||
set(AppExec enzoGui)
|
set(AppExec enzoGui)
|
||||||
set(TestExec tests)
|
set(TestExec tests)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
# setup project
|
# setup project
|
||||||
project(enzo_project)
|
project(enzo_project)
|
||||||
@@ -17,6 +18,7 @@ qt_standard_project_setup()
|
|||||||
|
|
||||||
|
|
||||||
qt_add_executable(${AppExec}
|
qt_add_executable(${AppExec}
|
||||||
|
static/resources.qrc
|
||||||
src/gui/main.cpp
|
src/gui/main.cpp
|
||||||
src/gui/Interface.cpp
|
src/gui/Interface.cpp
|
||||||
src/gui/viewport/Viewport.cpp
|
src/gui/viewport/Viewport.cpp
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ void NodeGraphic::initFonts()
|
|||||||
|
|
||||||
void NodeGraphic::initIcon()
|
void NodeGraphic::initIcon()
|
||||||
{
|
{
|
||||||
icon_ = new NodeIconGraphic("/home/parker/MyRepos/masters/static/node-icons/grid.svg", this);
|
icon_ = new NodeIconGraphic(":/node-icons/grid.svg", this);
|
||||||
// icon_ = new NodeIconGraphic("/home/parker/MyRepos/masters/static/icons/icon-main-white.svg", this);
|
// icon_ = new NodeIconGraphic("/home/parker/MyRepos/masters/static/icons/icon-main-white.svg", this);
|
||||||
|
|
||||||
icon_->setScale(1.0f/icon_->boundingRect().width()*iconScale_);
|
icon_->setScale(1.0f/icon_->boundingRect().width()*iconScale_);
|
||||||
|
|||||||
157
static/node-icons/grid.svg
Normal file
157
static/node-icons/grid.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 17 KiB |
5
static/resources.qrc
Normal file
5
static/resources.qrc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>node-icons/grid.svg</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
Reference in New Issue
Block a user