mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00

This sets the stage so that DisplaySettings can configure the screen layout and set various screen resolutions in one go. It also allows for an easy "atomic" revert of the previous settings.
40 lines
918 B
C++
40 lines
918 B
C++
/*
|
|
* Copyright (c) 2019-2020, Jesse Buhagiar <jooster669@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "MonitorWidget.h"
|
|
#include <LibCore/Timer.h>
|
|
#include <LibGUI/ColorInput.h>
|
|
#include <LibGUI/ComboBox.h>
|
|
#include <LibGUI/RadioButton.h>
|
|
#include <WindowServer/ScreenLayout.h>
|
|
|
|
namespace DisplaySettings {
|
|
|
|
class MonitorSettingsWidget : public GUI::Widget {
|
|
C_OBJECT(MonitorSettingsWidget);
|
|
|
|
public:
|
|
void apply_settings();
|
|
|
|
private:
|
|
MonitorSettingsWidget();
|
|
|
|
void create_frame();
|
|
void create_resolution_list();
|
|
void load_current_settings();
|
|
|
|
WindowServer::ScreenLayout m_screen_layout;
|
|
Vector<Gfx::IntSize> m_resolutions;
|
|
|
|
RefPtr<DisplaySettings::MonitorWidget> m_monitor_widget;
|
|
RefPtr<GUI::ComboBox> m_resolution_combo;
|
|
RefPtr<GUI::RadioButton> m_display_scale_radio_1x;
|
|
RefPtr<GUI::RadioButton> m_display_scale_radio_2x;
|
|
};
|
|
|
|
}
|