1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

LibGUI: Add an auto-repeat interval to GAbstractButton.

Use this in GSpinBox to implement auto-increment / auto-decrement while you
are pressing down the respective buttons. :^)
This commit is contained in:
Andreas Kling 2019-07-13 10:27:19 +02:00
parent c53f6a52e0
commit b425de18cc
5 changed files with 35 additions and 2 deletions

View file

@ -15,6 +15,10 @@ protected:
virtual void paint_event(GPaintEvent&) override;
private:
// These don't make sense for a radio button, so hide them.
using GAbstractButton::auto_repeat_interval;
using GAbstractButton::set_auto_repeat_interval;
virtual bool is_radio_button() const final { return true; }
template<typename Callback>