Add path rendering.

This commit is contained in:
jmsgrogan 2023-01-19 14:25:58 +00:00
parent f2ab532005
commit 97afa782a0
39 changed files with 1148 additions and 131 deletions

View file

@ -7,6 +7,7 @@
#include "MouseEvent.h"
#include "VerticalSpacer.h"
#include "MediaResources.h"
#include "Button.h"
@ -20,7 +21,9 @@ TEST_CASE(TestButton_Elevated, "ui_controls")
auto enabled_button = Button::Create(ButtonData::Component::Elevated);
enabled_button->setLabel("Enabled");
enabled_button->setSvgIcon(Resource::Icon::Svg::HOME_MEDIUM);
/*
auto disabled_button = Button::Create(ButtonData::Component::Elevated);
disabled_button->setEnabled(false);
disabled_button->setLabel("Disabled");
@ -28,9 +31,11 @@ TEST_CASE(TestButton_Elevated, "ui_controls")
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));
//spacer.addWidget(std::move(disabled_button));
//spacer.addWidget(std::move(pressed_button));
auto node = spacer.getRootNode();
@ -40,7 +45,7 @@ TEST_CASE(TestButton_Elevated, "ui_controls")
auto mouse_event = MouseEvent::Create();
mouse_event->setAction(MouseEvent::Action::Pressed);
mouse_event->setClientLocation({ 250, 20 });
spacer.onMouseEvent(mouse_event.get());
//spacer.onMouseEvent(mouse_event.get());
auto paint_event = PaintEvent::Create(theme_manager.get(), nullptr);
spacer.onPaintEvent(paint_event.get());