2021-11-24 16:47:39 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
2022-02-10 12:28:48 -07:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2021-11-24 16:47:39 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibGUI/CheckBox.h>
|
2021-11-25 12:26:54 +00:00
|
|
|
#include <LibGUI/ComboBox.h>
|
2021-11-24 16:47:39 +00:00
|
|
|
#include <LibGUI/SettingsWindow.h>
|
|
|
|
#include <LibGUI/TextBox.h>
|
|
|
|
|
|
|
|
class BrowserSettingsWidget final : public GUI::SettingsWindow::Tab {
|
2023-04-17 15:59:38 +10:00
|
|
|
C_OBJECT_ABSTRACT(BrowserSettingsWidget)
|
2021-11-24 16:47:39 +00:00
|
|
|
public:
|
2023-04-17 15:59:38 +10:00
|
|
|
static ErrorOr<NonnullRefPtr<BrowserSettingsWidget>> create();
|
2022-02-10 12:28:48 -07:00
|
|
|
virtual ~BrowserSettingsWidget() override = default;
|
2021-11-24 16:47:39 +00:00
|
|
|
|
|
|
|
virtual void apply_settings() override;
|
2021-11-25 13:58:05 +00:00
|
|
|
virtual void reset_default_values() override;
|
2021-11-24 16:47:39 +00:00
|
|
|
|
|
|
|
private:
|
2023-04-17 15:59:38 +10:00
|
|
|
ErrorOr<void> setup();
|
2021-11-24 16:47:39 +00:00
|
|
|
|
|
|
|
RefPtr<GUI::TextBox> m_homepage_url_textbox;
|
2022-06-25 21:08:17 +02:00
|
|
|
RefPtr<GUI::TextBox> m_new_tab_url_textbox;
|
2021-11-25 13:58:05 +00:00
|
|
|
void set_color_scheme(StringView);
|
2021-11-25 13:44:05 +00:00
|
|
|
RefPtr<GUI::ComboBox> m_color_scheme_combobox;
|
2021-11-24 20:04:43 +00:00
|
|
|
RefPtr<GUI::CheckBox> m_show_bookmarks_bar_checkbox;
|
2021-11-24 16:47:39 +00:00
|
|
|
RefPtr<GUI::CheckBox> m_auto_close_download_windows_checkbox;
|
2021-11-25 12:26:54 +00:00
|
|
|
|
2021-11-25 13:58:05 +00:00
|
|
|
void set_search_engine_url(StringView);
|
2021-11-25 12:26:54 +00:00
|
|
|
bool m_is_custom_search_engine { false };
|
|
|
|
RefPtr<GUI::CheckBox> m_enable_search_engine_checkbox;
|
|
|
|
RefPtr<GUI::Widget> m_search_engine_combobox_group;
|
|
|
|
RefPtr<GUI::ComboBox> m_search_engine_combobox;
|
|
|
|
RefPtr<GUI::Widget> m_custom_search_engine_group;
|
|
|
|
RefPtr<GUI::TextBox> m_custom_search_engine_textbox;
|
2021-11-24 16:47:39 +00:00
|
|
|
};
|