LibGUI: Make the timers in GAbstractButton and GScrollBar into children

This commit is contained in:
Andreas Kling 2019-08-18 12:14:15 +02:00
parent 93f14966c0
commit a1a4013b1c
Notes: sideshowbarker 2024-07-19 12:36:56 +09:00
2 changed files with 2 additions and 0 deletions

View file

@ -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();

View file

@ -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();