|
@@ -794,6 +794,22 @@ Ref<Texture2D> TabContainer::get_tab_icon(int p_tab) const {
|
|
|
return tab_bar->get_tab_icon(p_tab);
|
|
|
}
|
|
|
|
|
|
+void TabContainer::set_tab_icon_max_width(int p_tab, int p_width) {
|
|
|
+ if (tab_bar->get_tab_icon_max_width(p_tab) == p_width) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ tab_bar->set_tab_icon_max_width(p_tab, p_width);
|
|
|
+
|
|
|
+ _update_margins();
|
|
|
+ _repaint();
|
|
|
+ queue_redraw();
|
|
|
+}
|
|
|
+
|
|
|
+int TabContainer::get_tab_icon_max_width(int p_tab) const {
|
|
|
+ return tab_bar->get_tab_icon_max_width(p_tab);
|
|
|
+}
|
|
|
+
|
|
|
void TabContainer::set_tab_disabled(int p_tab, bool p_disabled) {
|
|
|
if (tab_bar->is_tab_disabled(p_tab) == p_disabled) {
|
|
|
return;
|
|
@@ -990,6 +1006,8 @@ void TabContainer::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("get_tab_tooltip", "tab_idx"), &TabContainer::get_tab_tooltip);
|
|
|
ClassDB::bind_method(D_METHOD("set_tab_icon", "tab_idx", "icon"), &TabContainer::set_tab_icon);
|
|
|
ClassDB::bind_method(D_METHOD("get_tab_icon", "tab_idx"), &TabContainer::get_tab_icon);
|
|
|
+ ClassDB::bind_method(D_METHOD("set_tab_icon_max_width", "tab_idx", "width"), &TabContainer::set_tab_icon_max_width);
|
|
|
+ ClassDB::bind_method(D_METHOD("get_tab_icon_max_width", "tab_idx"), &TabContainer::get_tab_icon_max_width);
|
|
|
ClassDB::bind_method(D_METHOD("set_tab_disabled", "tab_idx", "disabled"), &TabContainer::set_tab_disabled);
|
|
|
ClassDB::bind_method(D_METHOD("is_tab_disabled", "tab_idx"), &TabContainer::is_tab_disabled);
|
|
|
ClassDB::bind_method(D_METHOD("set_tab_hidden", "tab_idx", "hidden"), &TabContainer::set_tab_hidden);
|