diff options
author | TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> | 2021-09-26 12:04:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-26 18:04:09 +0200 |
commit | 3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab (patch) | |
tree | c60d824fdbd211710d51b89f60913fccc0ee9d76 /src/gui/guiTable.cpp | |
parent | 9f85862b7c0d2fd6fe964699bbeabc824026e848 (diff) | |
download | minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.tar.gz minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.tar.bz2 minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.zip |
Touch UI support for desktop builds (#10729)
Diffstat (limited to 'src/gui/guiTable.cpp')
-rw-r--r-- | src/gui/guiTable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/guiTable.cpp b/src/gui/guiTable.cpp index cab2e19fd..79ae1aea3 100644 --- a/src/gui/guiTable.cpp +++ b/src/gui/guiTable.cpp @@ -77,9 +77,10 @@ GUITable::GUITable(gui::IGUIEnvironment *env, setTabStop(true); setTabOrder(-1); updateAbsolutePosition(); +#ifdef HAVE_TOUCHSCREENGUI + float density = 1; // dp scaling is applied by the skin +#else float density = RenderingEngine::getDisplayDensity(); -#ifdef __ANDROID__ - density = 1; // dp scaling is applied by the skin #endif core::rect<s32> relative_rect = m_scrollbar->getRelativePosition(); s32 width = (relative_rect.getWidth() / (2.0 / 3.0)) * density * |