replaced qt font scaling

remove the qt font scaling and added code that uses the actual scale/dpi value
This commit is contained in:
fourtf
2017-12-23 21:18:13 +01:00
parent c9aa716f58
commit fc81b118c7
21 changed files with 298 additions and 155 deletions
+5 -3
View File
@@ -30,8 +30,8 @@ public:
return instance;
}
QFont &getFont(Type type);
QFontMetrics &getFontMetrics(Type type);
QFont &getFont(Type type, float dpi);
QFontMetrics &getFontMetrics(Type type, float dpi);
int getGeneration() const
{
@@ -122,10 +122,12 @@ private:
FontData veryLarge;
};
Font &getCurrentFont(float dpi);
// Future plans:
// Could have multiple fonts in here, such as "Menu font", "Application font", "Chat font"
Font currentFont;
std::list<std::pair<float, Font>> currentFontByDpi;
int generation = 0;
};