mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
DisplayProperties: Add options to set the background color and wallpaper mode.
Wallpaper mode and background color change options are now available. Monitor preview widget show new settings before apply. We have some missing preview features :(
This commit is contained in:
parent
f88b90f6fd
commit
7971af474d
6 changed files with 463 additions and 153 deletions
|
@ -26,16 +26,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Size.h>
|
||||
#include "MonitorWidget.h"
|
||||
#include <LibGUI/ComboBox.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
|
||||
class DisplayPropertiesWidget : public GUI::Widget {
|
||||
C_OBJECT(MonitorWidget);
|
||||
|
||||
class DisplayPropertiesWidget final {
|
||||
public:
|
||||
enum class ButtonOperations {
|
||||
Ok,
|
||||
|
@ -43,34 +40,25 @@ public:
|
|||
Cancel,
|
||||
};
|
||||
|
||||
enum TabIndices {
|
||||
Wallpaper,
|
||||
Settings
|
||||
};
|
||||
|
||||
public:
|
||||
DisplayPropertiesWidget();
|
||||
|
||||
// Apply the settings to the Window Server
|
||||
void send_settings_to_window_server(int tabIndex);
|
||||
void create_frame();
|
||||
|
||||
const GUI::Widget* root_widget() const { return m_root_widget; }
|
||||
GUI::Widget* root_widget() { return m_root_widget; }
|
||||
|
||||
private:
|
||||
void create_frame();
|
||||
void create_wallpaper_list();
|
||||
void create_resolution_list();
|
||||
void create_root_widget();
|
||||
void load_current_settings();
|
||||
void send_settings_to_window_server(); // Apply the settings to the Window Server
|
||||
|
||||
private:
|
||||
String m_wallpaper_path;
|
||||
RefPtr<Core::ConfigFile> m_wm_config;
|
||||
RefPtr<GUI::Widget> m_root_widget;
|
||||
Vector<Gfx::Size> m_resolutions;
|
||||
Vector<String> m_wallpapers;
|
||||
RefPtr<GUI::Label> m_wallpaper_preview;
|
||||
Vector<String> m_modes;
|
||||
Vector<Gfx::Size> m_resolutions;
|
||||
|
||||
Gfx::Size m_selected_resolution;
|
||||
String m_selected_wallpaper;
|
||||
RefPtr<GUI::Widget> m_root_widget;
|
||||
RefPtr<MonitorWidget> m_monitor_widget;
|
||||
RefPtr<GUI::ComboBox> m_wallpaper_combo;
|
||||
RefPtr<GUI::ComboBox> m_mode_combo;
|
||||
RefPtr<GUI::ComboBox> m_resolution_combo;
|
||||
RefPtr<GUI::TextBox> m_color_textbox;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue