mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibGUI: Make the timers in GAbstractButton and GScrollBar into children
This commit is contained in:
parent
93f14966c0
commit
a1a4013b1c
Notes:
sideshowbarker
2024-07-19 12:36:56 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a1a4013b1c4
2 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ GAbstractButton::GAbstractButton(GWidget* parent)
|
|||
GAbstractButton::GAbstractButton(const StringView& text, GWidget* parent)
|
||||
: GWidget(parent)
|
||||
, m_text(text)
|
||||
, m_auto_repeat_timer(this)
|
||||
{
|
||||
m_auto_repeat_timer.on_timeout = [this] {
|
||||
click();
|
||||
|
|
|
@ -60,6 +60,7 @@ static CharacterBitmap* s_right_arrow_bitmap;
|
|||
GScrollBar::GScrollBar(Orientation orientation, GWidget* parent)
|
||||
: GWidget(parent)
|
||||
, m_orientation(orientation)
|
||||
, m_automatic_scrolling_timer(this)
|
||||
{
|
||||
if (!s_up_arrow_bitmap)
|
||||
s_up_arrow_bitmap = &CharacterBitmap::create_from_ascii(s_up_arrow_bitmap_data, 9, 9).leak_ref();
|
||||
|
|
Loading…
Add table
Reference in a new issue