summaryrefslogtreecommitdiff
path: root/Applications/PaintBrush/SprayTool.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-02 15:07:41 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-02 15:15:33 +0100
commitc5bd9d4ed1d80ac91d46146565127b0c185f1b43 (patch)
treeb4ee9ba5999778450f8eb4006df89110617b4a10 /Applications/PaintBrush/SprayTool.cpp
parent2d39da5405a4527e91e853ddb1e56a539c96c6c1 (diff)
downloadserenity-c5bd9d4ed1d80ac91d46146565127b0c185f1b43.zip
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! :^)
Diffstat (limited to 'Applications/PaintBrush/SprayTool.cpp')
-rw-r--r--Applications/PaintBrush/SprayTool.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Applications/PaintBrush/SprayTool.cpp b/Applications/PaintBrush/SprayTool.cpp
index a224de9b98..cb07adf262 100644
--- a/Applications/PaintBrush/SprayTool.cpp
+++ b/Applications/PaintBrush/SprayTool.cpp
@@ -55,7 +55,7 @@ static double nrand()
void SprayTool::paint_it()
{
- GPainter painter(m_widget->bitmap());
+ GUI::Painter painter(m_widget->bitmap());
auto& bitmap = m_widget->bitmap();
ASSERT(bitmap.bpp() == 32);
m_widget->update();
@@ -74,7 +74,7 @@ void SprayTool::paint_it()
}
}
-void SprayTool::on_mousedown(GMouseEvent& event)
+void SprayTool::on_mousedown(GUI::MouseEvent& event)
{
if (!m_widget->rect().contains(event.position()))
return;
@@ -85,7 +85,7 @@ void SprayTool::on_mousedown(GMouseEvent& event)
paint_it();
}
-void SprayTool::on_mousemove(GMouseEvent& event)
+void SprayTool::on_mousemove(GUI::MouseEvent& event)
{
m_last_pos = event.position();
if (m_timer->is_active()) {
@@ -94,18 +94,18 @@ void SprayTool::on_mousemove(GMouseEvent& event)
}
}
-void SprayTool::on_mouseup(GMouseEvent&)
+void SprayTool::on_mouseup(GUI::MouseEvent&)
{
m_timer->stop();
}
-void SprayTool::on_contextmenu(GContextMenuEvent& event)
+void SprayTool::on_contextmenu(GUI::ContextMenuEvent& event)
{
if (!m_context_menu) {
- m_context_menu = GMenu::construct();
+ m_context_menu = GUI::Menu::construct();
m_thickness_actions.set_exclusive(true);
auto insert_action = [&](int size, bool checked = false) {
- auto action = GAction::create(String::number(size), [this, size](auto& action) {
+ auto action = GUI::Action::create(String::number(size), [this, size](auto& action) {
m_thickness = size;
action.set_checked(true);
});