LibCore: Remove ConfigFile::write_color_entry()

This method is currently unused and adds an unwanted dependency on
LibGfx.

This also adds some missing `LibGfx/Color.h` includes.
This commit is contained in:
MacDue 2022-06-04 20:19:44 +01:00 committed by Linus Groh
parent c579617375
commit fddff5f4f6
Notes: sideshowbarker 2024-07-17 17:38:29 +09:00
3 changed files with 1 additions and 7 deletions

View file

@ -176,11 +176,6 @@ void ConfigFile::write_bool_entry(String const& group, String const& key, bool v
write_entry(group, key, value ? "true" : "false");
}
void ConfigFile::write_color_entry(String const& group, String const& key, Color value)
{
write_entry(group, key, String::formatted("{},{},{},{}", value.red(), value.green(), value.blue(), value.alpha()));
}
ErrorOr<void> ConfigFile::sync()
{
if (!m_dirty)

View file

@ -15,7 +15,6 @@
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibCore/Stream.h>
#include <LibGfx/Color.h>
namespace Core {
@ -48,7 +47,6 @@ public:
void write_entry(String const& group, String const& key, String const& value);
void write_num_entry(String const& group, String const& key, int value);
void write_bool_entry(String const& group, String const& key, bool value);
void write_color_entry(String const& group, String const& key, Color value);
void dump() const;

View file

@ -9,6 +9,7 @@
#include "ScreenLayout.h"
#include <AK/Error.h>
#include <AK/Span.h>
#include <LibGfx/Color.h>
#include <sys/ioctl_numbers.h>
namespace WindowServer {