Merge pull request #114952 from YeldhamDev/hidden_tabs_offset_fix
Fix wrong offset for `TabBar` with hidden tabs
This commit is contained in:
commit
f5b3183251
1 changed files with 2 additions and 4 deletions
|
|
@ -1836,12 +1836,10 @@ void TabBar::_ensure_no_over_offset() {
|
|||
|
||||
int total_w = tabs[max_drawn_tab].ofs_cache + tabs[max_drawn_tab].size_cache - tabs[offset].ofs_cache;
|
||||
for (int i = offset - 1; i >= 0; i--) {
|
||||
if (tabs[i].hidden) {
|
||||
continue;
|
||||
if (!tabs[i].hidden) {
|
||||
total_w += tabs[i].size_cache;
|
||||
}
|
||||
|
||||
total_w += tabs[i].size_cache;
|
||||
|
||||
if (total_w < limit_with_buttons) {
|
||||
offset_with_buttons--;
|
||||
offset_with_no_button--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue