mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:27:45 +00:00
LibGfx+Userland: Remove dependency on GUI::TabWidget from StylePainter
Move TabPosition into its own file, and using it into the global namespace the same way we do for Gfx::Orientation. This unbreaks the gn build, and out of tree builds.
This commit is contained in:
parent
702dd0ca55
commit
d8ab9ed87c
11 changed files with 38 additions and 24 deletions
|
@ -131,13 +131,13 @@ BrowserWindow::BrowserWindow(WebView::CookieJar& cookie_jar, Vector<URL> const&
|
|||
Browser::BookmarksBarWidget::the().set_visible(show_bookmarks_bar);
|
||||
|
||||
m_window_actions.on_vertical_tabs = [this](auto& action) {
|
||||
m_tab_widget->set_tab_position(action.is_checked() ? GUI::TabWidget::TabPosition::Left : GUI::TabWidget::TabPosition::Top);
|
||||
m_tab_widget->set_tab_position(action.is_checked() ? TabPosition::Left : TabPosition::Top);
|
||||
Config::write_bool("Browser"sv, "Preferences"sv, "VerticalTabs"sv, action.is_checked());
|
||||
};
|
||||
|
||||
bool vertical_tabs = Config::read_bool("Browser"sv, "Preferences"sv, "VerticalTabs"sv, false);
|
||||
m_window_actions.vertical_tabs_action().set_checked(vertical_tabs);
|
||||
m_tab_widget->set_tab_position(vertical_tabs ? GUI::TabWidget::TabPosition::Left : GUI::TabWidget::TabPosition::Top);
|
||||
m_tab_widget->set_tab_position(vertical_tabs ? TabPosition::Left : TabPosition::Top);
|
||||
|
||||
build_menus();
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
backtrace_label.set_fixed_height(16);
|
||||
|
||||
auto& backtrace_tab_widget = backtrace_tab.add<GUI::TabWidget>();
|
||||
backtrace_tab_widget.set_tab_position(GUI::TabWidget::TabPosition::Bottom);
|
||||
backtrace_tab_widget.set_tab_position(TabPosition::Bottom);
|
||||
|
||||
auto& cpu_registers_tab = tab_widget.add_tab<GUI::Widget>("CPU Registers"_string);
|
||||
cpu_registers_tab.set_layout<GUI::VerticalBoxLayout>(4);
|
||||
|
@ -254,7 +254,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
cpu_registers_label.set_fixed_height(16);
|
||||
|
||||
auto& cpu_registers_tab_widget = cpu_registers_tab.add<GUI::TabWidget>();
|
||||
cpu_registers_tab_widget.set_tab_position(GUI::TabWidget::TabPosition::Bottom);
|
||||
cpu_registers_tab_widget.set_tab_position(TabPosition::Bottom);
|
||||
|
||||
auto& environment_tab = tab_widget.add_tab<GUI::Widget>("Environment"_string);
|
||||
environment_tab.set_layout<GUI::VerticalBoxLayout>(4);
|
||||
|
|
|
@ -72,7 +72,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
|
|||
current_cell_label.set_enabled(false);
|
||||
|
||||
m_tab_widget = container.add<GUI::TabWidget>();
|
||||
m_tab_widget->set_tab_position(GUI::TabWidget::TabPosition::Bottom);
|
||||
m_tab_widget->set_tab_position(TabPosition::Bottom);
|
||||
|
||||
m_cell_value_editor = cell_value_editor;
|
||||
m_current_cell_label = current_cell_label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue