mirror of https://github.com/OpenMW/openmw.git
Fix TrueType fonts scaling
parent
d84caff94d
commit
377d8c905c
@ -0,0 +1,24 @@
|
||||
#ifndef OPENMW_WIDGETS_WRAPPER_H
|
||||
#define OPENMW_WIDGETS_WRAPPER_H
|
||||
|
||||
#include <MyGUI_Prerequest.h>
|
||||
|
||||
#include "components/settings/values.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
template <class T>
|
||||
class FontWrapper : public T
|
||||
{
|
||||
public:
|
||||
void setFontName(std::string_view name) override
|
||||
{
|
||||
T::setFontName(name);
|
||||
T::setPropertyOverride("FontHeight", std::to_string(Settings::gui().mFontSize));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue