mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
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:
parent
d12b6b8677
commit
c7ab643883
13 changed files with 47 additions and 46 deletions
|
@ -39,7 +39,7 @@ public:
|
|||
: GButton(parent)
|
||||
, m_executable_path(exec_path)
|
||||
{
|
||||
set_button_style(GButtonStyle::CoolBar);
|
||||
set_button_style(ButtonStyle::CoolBar);
|
||||
set_icon(GraphicsBitmap::load_from_file(icon_path));
|
||||
set_preferred_size({ 50, 50 });
|
||||
set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GLabel.h>
|
||||
#include <LibGUI/GStyle.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -106,5 +106,5 @@ void MemoryStatsWidget::paint_event(GPaintEvent& event)
|
|||
{
|
||||
GPainter painter(*this);
|
||||
painter.set_clip_rect(event.rect());
|
||||
GStyle::the().paint_surface(painter, rect());
|
||||
StylePainter::the().paint_surface(painter, rect());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue