aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/guiTable.cpp')
-rw-r--r--src/gui/guiTable.cpp5
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 *