Move LibGUI/GStyle to SharedGraphics/StylePainter.

I want to paint some buttons in WindowServer where we don't have LibGUI.
This commit is contained in:
Andreas Kling 2019-03-28 17:32:38 +01:00
parent d12b6b8677
commit c7ab643883
Notes: sideshowbarker 2024-07-19 14:54:54 +09:00
13 changed files with 47 additions and 46 deletions

View file

@ -1,6 +1,6 @@
#include "GButton.h"
#include <LibGUI/GPainter.h>
#include <LibGUI/GStyle.h>
#include <SharedGraphics/StylePainter.h>
//#define GBUTTON_DEBUG
@ -26,7 +26,7 @@ void GButton::paint_event(GPaintEvent& event)
GPainter painter(*this);
painter.set_clip_rect(event.rect());
GStyle::the().paint_button(painter, rect(), m_button_style, m_being_pressed, m_hovered);
StylePainter::the().paint_button(painter, rect(), m_button_style, m_being_pressed, m_hovered);
if (!caption().is_empty() || m_icon) {
auto content_rect = rect();