ui: Fixed font size in graph smaller on non MacOS systems
This commit is contained in:
@@ -76,10 +76,16 @@ void GraphViewStyle::setImpl(std::shared_ptr<GraphViewStyleImpl> impl)
|
||||
|
||||
void GraphViewStyle::loadStyleSettings()
|
||||
{
|
||||
if (!s_impl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
s_fontSize = 14;
|
||||
s_fontName = ApplicationSettings::getInstance()->getFontName();
|
||||
|
||||
s_zoomFactor = ApplicationSettings::getInstance()->getFontSize() / float(s_fontSize);
|
||||
float zoomDifference = getImpl()->getGraphViewZoomDifferenceForPlatform();
|
||||
s_zoomFactor = (ApplicationSettings::getInstance()->getFontSize()) / float(s_fontSize) * zoomDifference;
|
||||
|
||||
s_charWidths.clear();
|
||||
s_charHeights.clear();
|
||||
|
||||
@@ -9,6 +9,7 @@ public:
|
||||
virtual ~GraphViewStyleImpl() { }
|
||||
virtual float getCharWidthForNodeType(Node::NodeType type) = 0;
|
||||
virtual float getCharHeightForNodeType(Node::NodeType type) = 0;
|
||||
virtual float getGraphViewZoomDifferenceForPlatform() = 0;
|
||||
};
|
||||
|
||||
#endif // GRAPH_VIEW_STYLE_IMPL_H
|
||||
|
||||
Reference in New Issue
Block a user