Initial steps for icon buttons.
This commit is contained in:
parent
8130308f7f
commit
f2ab532005
17 changed files with 66 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "ThemeManager.h"
|
||||
#include "PaintEvent.h"
|
||||
#include "MouseEvent.h"
|
||||
|
||||
#include "VerticalSpacer.h"
|
||||
|
||||
|
@ -24,14 +25,23 @@ TEST_CASE(TestButton_Elevated, "ui_controls")
|
|||
disabled_button->setEnabled(false);
|
||||
disabled_button->setLabel("Disabled");
|
||||
|
||||
auto pressed_button = Button::Create(ButtonData::Component::Elevated);
|
||||
pressed_button->setLabel("Pressed");
|
||||
|
||||
spacer.addWidget(std::move(enabled_button));
|
||||
spacer.addWidget(std::move(disabled_button));
|
||||
spacer.addWidget(std::move(pressed_button));
|
||||
|
||||
auto node = spacer.getRootNode();
|
||||
|
||||
TestRenderer renderer;
|
||||
renderer.getScene()->addNode(node);
|
||||
|
||||
auto mouse_event = MouseEvent::Create();
|
||||
mouse_event->setAction(MouseEvent::Action::Pressed);
|
||||
mouse_event->setClientLocation({ 250, 20 });
|
||||
spacer.onMouseEvent(mouse_event.get());
|
||||
|
||||
auto paint_event = PaintEvent::Create(theme_manager.get(), nullptr);
|
||||
spacer.onPaintEvent(paint_event.get());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue