summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-05-01 14:54:45 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-05-01 14:54:45 +0200
commitbbaf2969483d9b289bd8985067d546f5b60d645f (patch)
treed46c7f2dcaae46090ac26063ba5e1591886af67a /scene/gui
parent8dc9e557072dd93e6f70d0b5504f743df26c4b2c (diff)
Tabs: Fix icon size not taken into account for offset
Fixes #4107.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/tabs.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 9692d08882..ff95c8e084 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -620,6 +620,7 @@ int Tabs::get_tab_width(int p_idx) const {
Ref<Texture> tex = tabs[p_idx].icon;
if (tex.is_valid()) {
+ x+=tex->get_width();
if (tabs[p_idx].text!="")
x+=get_constant("hseparation");