File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -883,6 +883,7 @@ void mb_shell::menu_item_custom_widget::update(ui::update_context &ctx) {
883883 if (custom_widget) {
884884 auto ctx2 = ctx.with_offset (*x, *y);
885885 custom_widget->update (ctx2);
886+ custom_widget->parent = this ;
886887 }
887888}
888889void mb_shell::menu_item_custom_widget::render (ui::nanovg_context ctx) {
Original file line number Diff line number Diff line change 44#include " ui.h"
55#include " widget.h"
66#include < memory>
7+ #include < print>
78
89namespace mb_shell ::js {
910std::vector<std::shared_ptr<breeze_ui::js_widget>>
@@ -423,8 +424,8 @@ breeze_ui::js_flex_layout_widget::get_background_color() const {
423424 if ($widget) {
424425 auto flex_widget = std::dynamic_pointer_cast<widget_js_base>($widget);
425426 if (flex_widget) {
426- auto color = *flex_widget->background_color ;
427- return std::make_tuple (color[0 ], color[1 ], color[2 ], color[3 ]);
427+ auto color = *flex_widget->background_color ;
428+ return std::make_tuple (color[0 ], color[1 ], color[2 ], color[3 ]);
428429 }
429430 }
430431 return std::nullopt ;
@@ -443,7 +444,7 @@ breeze_ui::js_flex_layout_widget::get_background_paint() const {
443444 if ($widget) {
444445 auto flex_widget = std::dynamic_pointer_cast<widget_js_base>($widget);
445446 if (flex_widget) {
446- return std::make_shared<breeze_paint>(*flex_widget->background_paint );
447+ return std::make_shared<breeze_paint>(*flex_widget->background_paint );
447448 }
448449 }
449450 return nullptr ;
@@ -520,8 +521,7 @@ breeze_ui::js_flex_layout_widget::get_border_paint() const {
520521 if ($widget) {
521522 auto flex_widget = std::dynamic_pointer_cast<widget_js_base>($widget);
522523 if (flex_widget && flex_widget->border_paint ) {
523- return std::make_shared<breeze_paint>(
524- *flex_widget->border_paint );
524+ return std::make_shared<breeze_paint>(*flex_widget->border_paint );
525525 }
526526 }
527527 return nullptr ;
You can’t perform that action at this time.
0 commit comments