File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -267,10 +267,14 @@ void TabContainer::_repaint() {
267267 Vector<Control *> controls = _get_tab_controls ();
268268 int current = get_current_tab ();
269269
270+ // Move the TabBar to the top or bottom.
271+ // Don't change the left and right offsets since the TabBar will resize and may change tab offset.
270272 if (tabs_position == POSITION_BOTTOM) {
271- tab_bar->set_anchors_and_offsets_preset (PRESET_BOTTOM_WIDE);
273+ tab_bar->set_anchor_and_offset (SIDE_BOTTOM, 1.0 , 0.0 );
274+ tab_bar->set_anchor_and_offset (SIDE_TOP, 1.0 , -_get_tab_height ());
272275 } else {
273- tab_bar->set_anchors_and_offsets_preset (PRESET_TOP_WIDE);
276+ tab_bar->set_anchor_and_offset (SIDE_BOTTOM, 0.0 , _get_tab_height ());
277+ tab_bar->set_anchor_and_offset (SIDE_TOP, 0.0 , 0.0 );
274278 }
275279
276280 updating_visibility = true ;
@@ -299,7 +303,6 @@ void TabContainer::_repaint() {
299303 }
300304 updating_visibility = false ;
301305
302- _update_margins ();
303306 update_minimum_size ();
304307}
305308
You can’t perform that action at this time.
0 commit comments