mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
- add button-group, button-group-text and button-group-separator prototypes with orientation and separator APIs - mark direct children as geometry items, keep select, popover and dropdown wrappers out of the border geometry and clean up on unlink - theme the group for the nova style, covering nested groups, select, input group and first/last edge rules - add integration tests for factories, marking, geometry, input flex and trigger wrappers - add zh-CN documentation, field tables, sidebar entry and C/XML/TSX examples for every section
25 lines
951 B
C
25 lines
951 B
C
#include <LCUI.h>
|
|
|
|
void button_group_split_init(ui_widget_t *parent)
|
|
{
|
|
ui_widget_t *group = ui_create_button_group();
|
|
ui_widget_t *button = ui_create_button();
|
|
ui_widget_t *text = ui_create_widget("text");
|
|
ui_widget_t *icon_button = ui_create_button();
|
|
ui_widget_t *separator = ui_create_button_group_separator();
|
|
|
|
ui_widget_add_class(group, "button-group-split-demo");
|
|
ui_button_set_variant(button, UI_BUTTON_VARIANT_SECONDARY);
|
|
ui_text_set_content(text, "Button");
|
|
ui_widget_append(button, text);
|
|
|
|
ui_button_set_variant(icon_button, UI_BUTTON_VARIANT_SECONDARY);
|
|
ui_button_set_size(icon_button, UI_BUTTON_SIZE_ICON);
|
|
ui_widget_append(icon_button, ui_create_fluent_icon("add"));
|
|
|
|
ui_widget_append(group, button);
|
|
ui_widget_append(group, separator);
|
|
ui_widget_append(group, icon_button);
|
|
ui_widget_append(parent, group);
|
|
}
|