mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibGUI: Remove ControlBoxButton widget
ComboBoxes and SpinBoxes were still relying on ascii-to-bitmap icons instead of PNGs. This makes it easier to theme in the future.
This commit is contained in:
parent
24120d9dca
commit
d8fa479d05
7 changed files with 11 additions and 157 deletions
|
@ -24,7 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibGUI/ControlBoxButton.h>
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/SpinBox.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
|
||||
|
@ -52,11 +52,13 @@ SpinBox::SpinBox()
|
|||
set_value(m_value - 1);
|
||||
};
|
||||
|
||||
m_increment_button = add<ControlBoxButton>(ControlBoxButton::UpArrow);
|
||||
m_increment_button = add<Button>();
|
||||
m_increment_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/upward-triangle.png"));
|
||||
m_increment_button->set_focus_policy(GUI::FocusPolicy::NoFocus);
|
||||
m_increment_button->on_click = [this](auto) { set_value(m_value + 1); };
|
||||
m_increment_button->set_auto_repeat_interval(150);
|
||||
m_decrement_button = add<ControlBoxButton>(ControlBoxButton::DownArrow);
|
||||
m_decrement_button = add<Button>();
|
||||
m_decrement_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/downward-triangle.png"));
|
||||
m_decrement_button->set_focus_policy(GUI::FocusPolicy::NoFocus);
|
||||
m_decrement_button->on_click = [this](auto) { set_value(m_value - 1); };
|
||||
m_decrement_button->set_auto_repeat_interval(150);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue