mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibGUI: Make the timers in GAbstractButton and GScrollBar into children
This commit is contained in:
parent
93f14966c0
commit
a1a4013b1c
2 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ GAbstractButton::GAbstractButton(GWidget* parent)
|
||||||
GAbstractButton::GAbstractButton(const StringView& text, GWidget* parent)
|
GAbstractButton::GAbstractButton(const StringView& text, GWidget* parent)
|
||||||
: GWidget(parent)
|
: GWidget(parent)
|
||||||
, m_text(text)
|
, m_text(text)
|
||||||
|
, m_auto_repeat_timer(this)
|
||||||
{
|
{
|
||||||
m_auto_repeat_timer.on_timeout = [this] {
|
m_auto_repeat_timer.on_timeout = [this] {
|
||||||
click();
|
click();
|
||||||
|
|
|
@ -60,6 +60,7 @@ static CharacterBitmap* s_right_arrow_bitmap;
|
||||||
GScrollBar::GScrollBar(Orientation orientation, GWidget* parent)
|
GScrollBar::GScrollBar(Orientation orientation, GWidget* parent)
|
||||||
: GWidget(parent)
|
: GWidget(parent)
|
||||||
, m_orientation(orientation)
|
, m_orientation(orientation)
|
||||||
|
, m_automatic_scrolling_timer(this)
|
||||||
{
|
{
|
||||||
if (!s_up_arrow_bitmap)
|
if (!s_up_arrow_bitmap)
|
||||||
s_up_arrow_bitmap = &CharacterBitmap::create_from_ascii(s_up_arrow_bitmap_data, 9, 9).leak_ref();
|
s_up_arrow_bitmap = &CharacterBitmap::create_from_ascii(s_up_arrow_bitmap_data, 9, 9).leak_ref();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue