Tabs: Fix icon size not taken into account for offset

Fixes #4107.

(cherry picked from commit bbaf296948)
This commit is contained in:
Rémi Verschelde 2016-05-01 14:54:45 +02:00
parent ea9b552e27
commit 7f80fce464
1 changed files with 1 additions and 0 deletions

View File

@ -620,6 +620,7 @@ int Tabs::get_tab_width(int p_idx) const {
Ref<Texture> tex = tabs[p_idx].icon; Ref<Texture> tex = tabs[p_idx].icon;
if (tex.is_valid()) { if (tex.is_valid()) {
x+=tex->get_width();
if (tabs[p_idx].text!="") if (tabs[p_idx].text!="")
x+=get_constant("hseparation"); x+=get_constant("hseparation");