mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 01:55:07 +00:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -31,6 +31,8 @@
|
|||
#include <LibGUI/GCheckBox.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
static const char* s_checked_bitmap_data = {
|
||||
" "
|
||||
" # "
|
||||
|
@ -49,23 +51,23 @@ static const int s_checked_bitmap_height = 9;
|
|||
static const int s_box_width = 13;
|
||||
static const int s_box_height = 13;
|
||||
|
||||
GCheckBox::GCheckBox(GWidget* parent)
|
||||
: GAbstractButton(parent)
|
||||
CheckBox::CheckBox(Widget* parent)
|
||||
: AbstractButton(parent)
|
||||
{
|
||||
}
|
||||
|
||||
GCheckBox::GCheckBox(const StringView& text, GWidget* parent)
|
||||
: GAbstractButton(text, parent)
|
||||
CheckBox::CheckBox(const StringView& text, Widget* parent)
|
||||
: AbstractButton(text, parent)
|
||||
{
|
||||
}
|
||||
|
||||
GCheckBox::~GCheckBox()
|
||||
CheckBox::~CheckBox()
|
||||
{
|
||||
}
|
||||
|
||||
void GCheckBox::paint_event(GPaintEvent& event)
|
||||
void CheckBox::paint_event(PaintEvent& event)
|
||||
{
|
||||
GPainter painter(*this);
|
||||
Painter painter(*this);
|
||||
painter.add_clip_rect(event.rect());
|
||||
|
||||
auto text_rect = rect();
|
||||
|
@ -96,9 +98,11 @@ void GCheckBox::paint_event(GPaintEvent& event)
|
|||
paint_text(painter, text_rect, font(), TextAlignment::TopLeft);
|
||||
}
|
||||
|
||||
void GCheckBox::click()
|
||||
void CheckBox::click()
|
||||
{
|
||||
if (!is_enabled())
|
||||
return;
|
||||
set_checked(!is_checked());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue