logic: file paths
Changed relative file paths for resources to absolute paths to ensure functionality of shortcuts and file associations on windows platform
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "qt/view/QtCodeView.h"
|
||||
|
||||
#include "utility/file/FileSystem.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
|
||||
#include "qt/element/QtCodeArea.h"
|
||||
@@ -185,5 +186,5 @@ void QtCodeView::setStyleSheet() const
|
||||
{
|
||||
utility::setWidgetBackgroundColor(m_widget, ColorScheme::getInstance()->getColor("code/background"));
|
||||
|
||||
m_widget->setStyleSheet(utility::getStyleSheet("data/gui/code_view/code_view.css").c_str());
|
||||
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "code_view/code_view.css").c_str());
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "component/controller/helper/GraphPostprocessor.h"
|
||||
#include "component/view/GraphViewStyle.h"
|
||||
#include "utility/messaging/type/MessageDeactivateEdge.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "qt/utility/utilityQt.h"
|
||||
|
||||
@@ -287,7 +288,7 @@ void QtGraphView::doRefreshView()
|
||||
doClear();
|
||||
doResize();
|
||||
|
||||
std::string css = utility::getStyleSheet("data/gui/graph_view/graph_view.css");
|
||||
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath() + "graph_view/graph_view.css");
|
||||
getView()->setStyleSheet(css.c_str());
|
||||
|
||||
float zoomFactor = GraphViewStyle::getZoomFactor();
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "qt/utility/utilityQt.h"
|
||||
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "component/controller/RefreshController.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
|
||||
@@ -39,5 +41,5 @@ void QtRefreshView::doRefreshView()
|
||||
|
||||
void QtRefreshView::setStyleSheet()
|
||||
{
|
||||
m_widget->setStyleSheet(utility::getStyleSheet("data/gui/refresh_view/refresh_view.css").c_str());
|
||||
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "refresh_view/refresh_view.css").c_str());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "qt/utility/utilityQt.h"
|
||||
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "component/controller/SearchController.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
|
||||
@@ -75,7 +77,7 @@ void QtSearchView::doSetAutocompletionList(const std::vector<SearchMatch>& autoc
|
||||
|
||||
void QtSearchView::setStyleSheet()
|
||||
{
|
||||
std::string css = utility::getStyleSheet("data/gui/search_view/search_view.css");
|
||||
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath() + "search_view/search_view.css");
|
||||
|
||||
m_widget->setStyleSheet(css.c_str());
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "qt/view/QtMainView.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
QtUndoRedoView::QtUndoRedoView(ViewLayout* viewLayout)
|
||||
: UndoRedoView(viewLayout)
|
||||
, m_refreshFunctor(std::bind(&QtUndoRedoView::doRefreshView, this))
|
||||
@@ -35,7 +37,7 @@ void QtUndoRedoView::refreshView()
|
||||
|
||||
void QtUndoRedoView::setStyleSheet()
|
||||
{
|
||||
m_widget->setStyleSheet(utility::getStyleSheet("data/gui/undoredo_view/undoredo_view.css").c_str());
|
||||
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "undoredo_view/undoredo_view.css").c_str());
|
||||
}
|
||||
|
||||
void QtUndoRedoView::doRefreshView()
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <QGraphicsSceneEvent>
|
||||
#include <QPen>
|
||||
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "component/controller/helper/GraphPostprocessor.h"
|
||||
|
||||
#include "qt/graphics/QtRoundedRectItem.h"
|
||||
@@ -371,7 +373,7 @@ void QtGraphNode::setStyle(const GraphViewStyle::NodeStyle& style)
|
||||
|
||||
if (style.hasHatching)
|
||||
{
|
||||
QtDeviceScaledPixmap pattern("data/gui/graph_view/images/pattern.png");
|
||||
QtDeviceScaledPixmap pattern((ResourcePaths::getGuiPath() + "graph_view/images/pattern.png").c_str());
|
||||
pattern.scaleToHeight(10);
|
||||
QPixmap pixmap = utility::colorizePixmap(pattern.pixmap(), style.color.hatching.c_str());
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <QFontMetrics>
|
||||
#include <QPen>
|
||||
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "component/view/GraphViewStyle.h"
|
||||
#include "qt/graphics/QtRoundedRectItem.h"
|
||||
#include "qt/utility/QtDeviceScaledPixmap.h"
|
||||
@@ -35,9 +37,13 @@ QtGraphNodeAccess::QtGraphNodeAccess(TokenComponentAccess::AccessType accessType
|
||||
break;
|
||||
}
|
||||
|
||||
QtDeviceScaledPixmap pixmap(QString::fromStdString(ResourcePaths::getGuiPath() + "graph_view/images/" + accessString + ".png"));
|
||||
|
||||
pixmap.scaleToHeight(m_accessIconSize);
|
||||
|
||||
if (fileName.size() > 0)
|
||||
{
|
||||
QtDeviceScaledPixmap pixmap(QString::fromStdString("data/gui/graph_view/images/" + fileName + ".png"));
|
||||
QtDeviceScaledPixmap pixmap(QString::fromStdString(ResourcePaths::getGuiPath() + fileName + ".png"));
|
||||
pixmap.scaleToHeight(m_accessIconSize);
|
||||
|
||||
m_accessIcon = new QGraphicsPixmapItem(pixmap.pixmap(), this);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/messaging/type/MessageGraphNodeExpand.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
#include "qt/graphics/QtRoundedRectItem.h"
|
||||
#include "qt/utility/QtDeviceScaledPixmap.h"
|
||||
@@ -23,7 +24,7 @@ QtGraphNodeExpandToggle::QtGraphNodeExpandToggle(bool expanded, int invisibleSub
|
||||
const int iconHeight = 4;
|
||||
m_icon = new QGraphicsPixmapItem(this);
|
||||
|
||||
QtDeviceScaledPixmap pixmap("data/gui/graph_view/images/arrow.png");
|
||||
QtDeviceScaledPixmap pixmap((ResourcePaths::getGuiPath() + "graph_view/images/arrow.png").c_str());
|
||||
pixmap.scaleToHeight(iconHeight);
|
||||
|
||||
if (invisibleSubNodeCount)
|
||||
|
||||
Reference in New Issue
Block a user