Allow Qt platforms to use smallWindow dpi logic.

It doesn't look like there's any reason to limit this to Windows.
This commit is contained in:
Unknown W. Brackets 2016-05-21 07:56:41 -07:00
parent bb7dd908ba
commit 6159bc003b
2 changed files with 4 additions and 3 deletions

View file

@ -127,11 +127,11 @@ bool UpdateScreenScale(int width, int height, bool smallWindow) {
g_dpi_scale = 1.0f;
#if defined(__SYMBIAN32__)
g_dpi_scale = 1.4f;
#elif defined(_WIN32)
#endif
if (smallWindow) {
g_dpi_scale = 2.0f;
}
#endif
pixel_in_dps = 1.0f / g_dpi_scale;
int new_dp_xres = width * g_dpi_scale;

View file

@ -239,7 +239,8 @@ QString MainUI::InputBoxGetQString(QString title, QString defaultValue)
void MainUI::resizeGL(int w, int h)
{
UpdateScreenScale(w, h, false);
bool smallWindow = g_Config.IsPortrait() ? (h < 480 + 80) : (w < 480 + 80);
UpdateScreenScale(w, h, smallWindow);
xscale = w / this->width();
yscale = h / this->height();