Skip to content

Commit 9ffe52a

Browse files
chore: update breeze-ui
1 parent 634bead commit 9ffe52a

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

dependencies/breeze-ui.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package("breeze-glfw")
55

66
package("breeze-ui")
77
add_urls("https://github.com/std-microblock/breeze-ui.git")
8-
add_versions("2025.10.08", "6b567dd25d4b5a1b85a3893c0d909819cd0598e9")
8+
add_versions("2025.10.09", "c880cbc29340861ba75ca512ddb190d4e2dc416c")
99
add_deps("breeze-glfw", "nanovg", "glad", "nanosvg")
1010
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
1111

src/inject/inject.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ int NewExplorerProcessAndInject() {
217217

218218
static bool english = GetUserDefaultUILanguage() != 2052;
219219

220-
struct inject_ui_title : public ui::widget_flex {
220+
struct inject_ui_title : public ui::flex_widget {
221221
inject_ui_title() {
222222
gap = 10;
223223

@@ -467,7 +467,7 @@ struct breeze_icon : public ui::widget {
467467
}
468468
};
469469

470-
struct injector_ui_main : public ui::widget_flex {
470+
struct injector_ui_main : public ui::flex_widget {
471471
ui::sp_anim_float opacity = anim_float(100);
472472
injector_ui_main() {
473473
x->reset_to(20);
@@ -479,17 +479,17 @@ struct injector_ui_main : public ui::widget_flex {
479479
emplace_child<breeze_icon>();
480480
emplace_child<inject_ui_title>();
481481

482-
auto switches_box = emplace_child<ui::widget_flex>();
482+
auto switches_box = emplace_child<ui::flex_widget>();
483483
switches_box->gap = 7;
484-
auto switches = switches_box->emplace_child<ui::widget_flex>();
484+
auto switches = switches_box->emplace_child<ui::flex_widget>();
485485
switches->gap = 7;
486486
switches->horizontal = true;
487487

488488
switches->emplace_child<inject_all_switch>();
489489
switches->emplace_child<inject_once_switch>();
490490
switches->emplace_child<data_dir_btn>();
491491

492-
switches = switches_box->emplace_child<ui::widget_flex>();
492+
switches = switches_box->emplace_child<ui::flex_widget>();
493493
switches->gap = 7;
494494
switches->horizontal = true;
495495
switches->emplace_child<start_when_startup_switch>();
@@ -515,7 +515,7 @@ struct injector_ui_main : public ui::widget_flex {
515515
ctx.fillPaint(bg);
516516
ctx.fill();
517517

518-
widget_flex::render(ctx);
518+
flex_widget::render(ctx);
519519
}
520520
};
521521

@@ -571,14 +571,14 @@ void ShowCrashDialog() {
571571

572572
nvgCreateFont(rt.nvg, "main", "C:\\WINDOWS\\FONTS\\msyh.ttc");
573573

574-
auto error_ui = rt.root->emplace_child<ui::widget_flex>();
574+
auto error_ui = rt.root->emplace_child<ui::flex_widget>();
575575
error_ui->gap = 15;
576576
error_ui->x->reset_to(20);
577577
error_ui->y->reset_to(0);
578578

579579
error_ui->emplace_child<breeze_icon>();
580580

581-
auto msg_box = error_ui->emplace_child<ui::widget_flex>();
581+
auto msg_box = error_ui->emplace_child<ui::flex_widget>();
582582
msg_box->gap = 10;
583583

584584
auto title = msg_box->emplace_child<ui::text_widget>();
@@ -608,7 +608,7 @@ void ShowCrashDialog() {
608608
suggestion2->font_size = 14;
609609
suggestion2->color.reset_to({1, 1, 1, 0.9});
610610

611-
auto btn_container = error_ui->emplace_child<ui::widget_flex>();
611+
auto btn_container = error_ui->emplace_child<ui::flex_widget>();
612612
btn_container->horizontal = true;
613613
btn_container->gap = 10;
614614

src/shell/script/binding_types_breeze_ui.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,30 +271,30 @@ breeze_ui::widgets_factory::create_image_widget() {
271271

272272
std::shared_ptr<breeze_ui::js_spacer_widget>
273273
breeze_ui::widgets_factory::create_spacer_widget() {
274-
auto iw = std::make_shared<ui::widget_flex::spacer>();
274+
auto iw = std::make_shared<ui::flex_widget::spacer>();
275275

276276
auto res = std::make_shared<js_spacer_widget>();
277277
res->$widget = std::dynamic_pointer_cast<ui::widget>(iw);
278278
return res;
279279
}
280280

281281
void breeze_ui::js_spacer_widget::set_size(float size) {
282-
auto w = $widget->downcast<ui::widget_flex::spacer>();
282+
auto w = $widget->downcast<ui::flex_widget::spacer>();
283283
if (w) {
284284
w->size = size;
285285
}
286286
}
287287

288288
float breeze_ui::js_spacer_widget::get_size() const {
289-
auto w = $widget->downcast<ui::widget_flex::spacer>();
289+
auto w = $widget->downcast<ui::flex_widget::spacer>();
290290
if (w) {
291291
return w->size;
292292
}
293293
return 0;
294294
}
295295

296-
struct widget_js_base : public ui::widget_flex {
297-
using super = ui::widget_flex;
296+
struct widget_js_base : public ui::flex_widget {
297+
using super = ui::flex_widget;
298298

299299
std::function<void(int)> on_click;
300300
std::function<void(float, float)> on_mouse_move;
@@ -509,37 +509,37 @@ IMPL_SIMPLE_PROP(breeze_ui::js_flex_layout_widget, widget_js_base, auto_size,
509509

510510
IMPL_SIMPLE_PROP(breeze_ui::js_flex_layout_widget, widget_js_base, gap, float)
511511
std::string breeze_ui::js_flex_layout_widget::get_justify_content() const {
512-
auto widget = std::dynamic_pointer_cast<ui::widget_flex>($widget);
512+
auto widget = std::dynamic_pointer_cast<ui::flex_widget>($widget);
513513
if (!widget)
514514
return "";
515515
return std::string(reflect::enum_name(widget->justify_content));
516516
}
517517

518518
void breeze_ui::js_flex_layout_widget::set_justify_content(
519519
std::string justify) {
520-
auto widget = std::dynamic_pointer_cast<ui::widget_flex>($widget);
520+
auto widget = std::dynamic_pointer_cast<ui::flex_widget>($widget);
521521
if (!widget)
522522
return;
523523

524524
if (auto val =
525-
mb_shell::enum_from_string<ui::widget_flex::justify>(justify)) {
525+
mb_shell::enum_from_string<ui::flex_widget::justify>(justify)) {
526526
widget->justify_content = *val;
527527
}
528528
}
529529

530530
std::string breeze_ui::js_flex_layout_widget::get_align_items() const {
531-
auto widget = std::dynamic_pointer_cast<ui::widget_flex>($widget);
531+
auto widget = std::dynamic_pointer_cast<ui::flex_widget>($widget);
532532
if (!widget)
533533
return "";
534534
return std::string(reflect::enum_name(widget->align_items));
535535
}
536536

537537
void breeze_ui::js_flex_layout_widget::set_align_items(std::string align) {
538-
auto widget = std::dynamic_pointer_cast<ui::widget_flex>($widget);
538+
auto widget = std::dynamic_pointer_cast<ui::flex_widget>($widget);
539539
if (!widget)
540540
return;
541541

542-
if (auto val = mb_shell::enum_from_string<ui::widget_flex::align>(align)) {
542+
if (auto val = mb_shell::enum_from_string<ui::flex_widget::align>(align)) {
543543
widget->align_items = *val;
544544
}
545545
}

src/shell/taskbar/taskbar_widget.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ struct app_list_stack_widget : public ui::widget {
299299
}
300300
};
301301

302-
struct app_list_widget : public ui::widget_flex {
303-
using super = ui::widget_flex;
302+
struct app_list_widget : public ui::flex_widget {
303+
using super = ui::flex_widget;
304304
std::vector<
305305
std::pair<std::shared_ptr<app_list_stack_widget>, window_stack_info>>
306306
stacks;
@@ -618,7 +618,7 @@ taskbar_widget::taskbar_widget() {
618618
app_list->update_stacks();
619619
taskbar_widgets.insert(this);
620620

621-
emplace_child<ui::widget_flex::spacer>();
621+
emplace_child<ui::flex_widget::spacer>();
622622
auto clock = emplace_child<clock_widget>();
623623
auto desktop_btn = emplace_child<desktop_button_widget>();
624624

src/shell/taskbar/taskbar_widget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "shell/widgets/background_widget.h"
2020

2121
namespace mb_shell::taskbar {
22-
struct taskbar_widget : public ui::widget_flex {
22+
struct taskbar_widget : public ui::flex_widget {
2323
taskbar_widget();
2424
~taskbar_widget();
2525
};

src/shell/widgets/scrollable_widget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace mb_shell {
1212
* A widget that provides scrollable content with vertical scrollbar
1313
* Handles scroll input and renders a scrollbar when content exceeds max_height
1414
*/
15-
struct scrollable_widget : public ui::widget_flex {
16-
using super = ui::widget_flex;
15+
struct scrollable_widget : public ui::flex_widget {
16+
using super = ui::flex_widget;
1717

1818
float max_height = 99999;
1919
float actual_height = 0;

0 commit comments

Comments
 (0)