mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibGUI: Add GInputBox for getting a string from a modal dialog.
Use this to implement some of the toolbar actions in IRCClient. :^)
This commit is contained in:
@@ -70,6 +70,12 @@ void GButton::mousedown_event(GMouseEvent& event)
|
||||
GWidget::mousedown_event(event);
|
||||
}
|
||||
|
||||
void GButton::click()
|
||||
{
|
||||
if (on_click)
|
||||
on_click(*this);
|
||||
}
|
||||
|
||||
void GButton::mouseup_event(GMouseEvent& event)
|
||||
{
|
||||
#ifdef GBUTTON_DEBUG
|
||||
@@ -81,10 +87,8 @@ void GButton::mouseup_event(GMouseEvent& event)
|
||||
m_tracking_cursor = false;
|
||||
set_global_cursor_tracking(false);
|
||||
update();
|
||||
if (was_being_pressed) {
|
||||
if (on_click)
|
||||
on_click(*this);
|
||||
}
|
||||
if (was_being_pressed)
|
||||
click();
|
||||
}
|
||||
GWidget::mouseup_event(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user