mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 18:52:56 +00:00
With this change you can now set the theme and background color at the same time in the Display Settings. Before if both were changed before hitting 'apply' the theme background color would overwrite the custom background.
39 lines
840 B
C++
39 lines
840 B
C++
/*
|
|
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <AK/Vector.h>
|
|
#include <LibGUI/ComboBox.h>
|
|
#include <LibGUI/SettingsWindow.h>
|
|
#include <LibGfx/SystemTheme.h>
|
|
|
|
#include "ThemePreviewWidget.h"
|
|
|
|
namespace DisplaySettings {
|
|
|
|
class ThemesSettingsWidget final : public GUI::SettingsWindow::Tab {
|
|
C_OBJECT(ThemesSettingsWidget);
|
|
|
|
public:
|
|
virtual void apply_settings() override;
|
|
|
|
private:
|
|
Vector<Gfx::SystemThemeMetaData> m_themes;
|
|
Vector<String> m_theme_names;
|
|
|
|
RefPtr<GUI::ComboBox> m_themes_combo;
|
|
RefPtr<ThemePreviewWidget> m_theme_preview;
|
|
|
|
Gfx::SystemThemeMetaData const* m_selected_theme { nullptr };
|
|
|
|
bool& m_background_settings_changed;
|
|
|
|
ThemesSettingsWidget(bool& background_settings_changed);
|
|
};
|
|
|
|
}
|