diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index df31aaa99a..5ec448c3a5 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -74,9 +74,6 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url) auto& top_line = *widget.find_descendant_of_type_named("top_line"); m_tab_widget = *widget.find_descendant_of_type_named("tab_widget"); - m_tab_widget->set_reorder_allowed(true); - m_tab_widget->set_close_button_enabled(true); - m_tab_widget->on_tab_count_change = [&top_line](size_t tab_count) { top_line.set_visible(tab_count > 1); }; diff --git a/Userland/Applications/Browser/BrowserWindow.gml b/Userland/Applications/Browser/BrowserWindow.gml index d0e1a90672..91524855ef 100644 --- a/Userland/Applications/Browser/BrowserWindow.gml +++ b/Userland/Applications/Browser/BrowserWindow.gml @@ -13,6 +13,8 @@ name: "tab_widget" container_margins: [0] uniform_tabs: true + reorder_allowed: true + show_close_buttons: true text_alignment: "CenterLeft" } } diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index 70538a5c60..004a881358 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -40,9 +40,6 @@ MainWidget::MainWidget() m_statusbar = *find_descendant_of_type_named("statusbar"); m_tab_widget = find_descendant_of_type_named("tab_widget"); - m_tab_widget->set_container_margins({ 4, 5, 5, 4 }); - m_tab_widget->set_reorder_allowed(true); - m_tab_widget->set_close_button_enabled(true); m_palette_widget = *find_descendant_of_type_named("palette_widget"); diff --git a/Userland/Applications/PixelPaint/PixelPaintWindow.gml b/Userland/Applications/PixelPaint/PixelPaintWindow.gml index 59e721b07e..30e017f4b1 100644 --- a/Userland/Applications/PixelPaint/PixelPaintWindow.gml +++ b/Userland/Applications/PixelPaint/PixelPaintWindow.gml @@ -33,6 +33,9 @@ @GUI::TabWidget { name: "tab_widget" + container_margins: [4, 5, 5, 4] + reorder_allowed: true + show_close_buttons: true } @PixelPaint::PaletteWidget { diff --git a/Userland/Demos/WidgetGallery/GalleryGML/Window.gml b/Userland/Demos/WidgetGallery/GalleryGML/Window.gml index 4e7eb0c49e..bb8be74cd5 100644 --- a/Userland/Demos/WidgetGallery/GalleryGML/Window.gml +++ b/Userland/Demos/WidgetGallery/GalleryGML/Window.gml @@ -6,5 +6,6 @@ @GUI::TabWidget { name: "tab_widget" + reorder_allowed: true } } diff --git a/Userland/Demos/WidgetGallery/GalleryWidget.cpp b/Userland/Demos/WidgetGallery/GalleryWidget.cpp index e0ed10c1df..69350adbee 100644 --- a/Userland/Demos/WidgetGallery/GalleryWidget.cpp +++ b/Userland/Demos/WidgetGallery/GalleryWidget.cpp @@ -34,7 +34,6 @@ GalleryWidget::GalleryWidget() load_from_gml(window_gml); auto& tab_widget = *find_descendant_of_type_named("tab_widget"); - tab_widget.set_reorder_allowed(true); auto basics_tab = tab_widget.try_add_tab("Basics").release_value_but_fixme_should_propagate_errors(); basics_tab->load_from_gml(basics_tab_gml);