ui: Fixed icon sizes when scaling to highDPI screens fails

* Fixed gcc compile error
This commit is contained in:
Eberhard Graether
2017-11-25 18:21:19 +01:00
parent 2b7349bf9b
commit bfc7a55f70
12 changed files with 43 additions and 7 deletions
+4 -4
View File
@@ -11,8 +11,8 @@
int GraphViewStyle::s_gridCellSize = 5;
int GraphViewStyle::s_gridCellPadding = 10;
std::unordered_map<NodeType::StyleType, float> GraphViewStyle::s_charWidths;
std::unordered_map<NodeType::StyleType, float> GraphViewStyle::s_charHeights;
std::map<NodeType::StyleType, float> GraphViewStyle::s_charWidths;
std::map<NodeType::StyleType, float> GraphViewStyle::s_charHeights;
std::shared_ptr<GraphViewStyleImpl> GraphViewStyle::s_impl;
@@ -704,7 +704,7 @@ const GraphViewStyle::NodeColor& GraphViewStyle::getScreenMatchColor(bool focus)
float GraphViewStyle::getCharWidth(NodeType::StyleType type)
{
std::unordered_map<NodeType::StyleType, float>::const_iterator it = s_charWidths.find(type);
std::map<NodeType::StyleType, float>::const_iterator it = s_charWidths.find(type);
if (it != s_charWidths.end())
{
@@ -718,7 +718,7 @@ float GraphViewStyle::getCharWidth(NodeType::StyleType type)
float GraphViewStyle::getCharHeight(NodeType::StyleType type)
{
std::unordered_map<NodeType::StyleType, float>::const_iterator it = s_charHeights.find(type);
std::map<NodeType::StyleType, float>::const_iterator it = s_charHeights.find(type);
if (it != s_charHeights.end())
{
+2 -3
View File
@@ -3,7 +3,6 @@
#include <map>
#include <memory>
#include <unordered_map>
#include "utility/math/Vector2.h"
@@ -150,8 +149,8 @@ private:
static float getCharWidth(NodeType::StyleType type);
static float getCharHeight(NodeType::StyleType type);
static std::unordered_map<NodeType::StyleType, float> s_charWidths;
static std::unordered_map<NodeType::StyleType, float> s_charHeights;
static std::map<NodeType::StyleType, float> s_charWidths;
static std::map<NodeType::StyleType, float> s_charHeights;
static std::shared_ptr<GraphViewStyleImpl> s_impl;