LibGfx: Remove unnecessary use of LibGUI in Gfx::Palette

Let's not require a cross-library badge like this.
This commit is contained in:
Andreas Kling 2024-06-02 20:26:56 +02:00
parent 09980af4ea
commit 3020c5766e
Notes: sideshowbarker 2024-07-17 18:08:55 +09:00
3 changed files with 3 additions and 4 deletions

View File

@ -212,7 +212,7 @@ void Application::set_system_palette(Core::AnonymousBuffer& buffer)
if (!m_system_palette)
m_system_palette = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
else
m_system_palette->replace_internal_buffer({}, buffer);
m_system_palette->replace_internal_buffer(buffer);
if (!m_palette)
m_palette = m_system_palette;

View File

@ -87,7 +87,7 @@ void Palette::set_path(PathRole role, ByteString path)
theme.path[(int)role][sizeof(theme.path[(int)role]) - 1] = '\0';
}
void PaletteImpl::replace_internal_buffer(Badge<GUI::Application>, Core::AnonymousBuffer buffer)
void PaletteImpl::replace_internal_buffer(Core::AnonymousBuffer buffer)
{
m_theme_buffer = move(buffer);
}

View File

@ -12,7 +12,6 @@
#include <AK/Noncopyable.h>
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <LibGUI/Forward.h>
#include <LibGfx/SystemTheme.h>
namespace Gfx {
@ -48,7 +47,7 @@ public:
ByteString path(PathRole) const;
SystemTheme const& theme() const { return *m_theme_buffer.data<SystemTheme>(); }
void replace_internal_buffer(Badge<GUI::Application>, Core::AnonymousBuffer buffer);
void replace_internal_buffer(Core::AnonymousBuffer);
private:
explicit PaletteImpl(Core::AnonymousBuffer);