mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +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
|
@ -38,11 +38,11 @@
|
|||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
|
||||
class ToolButton final : public GButton {
|
||||
class ToolButton final : public GUI::Button {
|
||||
C_OBJECT(ToolButton)
|
||||
public:
|
||||
ToolButton(const String& name, GWidget* parent, OwnPtr<Tool>&& tool)
|
||||
: GButton(parent)
|
||||
ToolButton(const String& name, GUI::Widget* parent, OwnPtr<Tool>&& tool)
|
||||
: GUI::Button(parent)
|
||||
, m_tool(move(tool))
|
||||
{
|
||||
set_tooltip(name);
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
const Tool& tool() const { return *m_tool; }
|
||||
Tool& tool() { return *m_tool; }
|
||||
|
||||
virtual void context_menu_event(GContextMenuEvent& event) override
|
||||
virtual void context_menu_event(GUI::ContextMenuEvent& event) override
|
||||
{
|
||||
set_checked(true);
|
||||
m_tool->on_contextmenu(event);
|
||||
|
@ -61,8 +61,8 @@ private:
|
|||
OwnPtr<Tool> m_tool;
|
||||
};
|
||||
|
||||
ToolboxWidget::ToolboxWidget(GWidget* parent)
|
||||
: GFrame(parent)
|
||||
ToolboxWidget::ToolboxWidget(GUI::Widget* parent)
|
||||
: GUI::Frame(parent)
|
||||
{
|
||||
set_fill_with_background_color(true);
|
||||
|
||||
|
@ -70,15 +70,15 @@ ToolboxWidget::ToolboxWidget(GWidget* parent)
|
|||
set_frame_shape(FrameShape::Panel);
|
||||
set_frame_shadow(FrameShadow::Raised);
|
||||
|
||||
set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
|
||||
set_preferred_size(48, 0);
|
||||
|
||||
set_layout(make<GVBoxLayout>());
|
||||
set_layout(make<GUI::VBoxLayout>());
|
||||
layout()->set_margins({ 4, 4, 4, 4 });
|
||||
|
||||
auto add_tool = [&](const StringView& name, const StringView& icon_name, OwnPtr<Tool>&& tool) {
|
||||
auto button = ToolButton::construct(name, this, move(tool));
|
||||
button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
button->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||
button->set_preferred_size(0, 32);
|
||||
button->set_checkable(true);
|
||||
button->set_exclusive(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue