mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibGfx: Remove unnecessary use of LibGUI in Gfx::Palette
Let's not require a cross-library badge like this.
This commit is contained in:
parent
09980af4ea
commit
3020c5766e
Notes:
sideshowbarker
2024-07-17 18:08:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3020c5766e
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue