mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-19 13:03:33 -04:00
UI: Use decorator: text for close button
This commit is contained in:
@@ -41,9 +41,7 @@ TabBar::TabBar(Rml::Element* parent, Props props)
|
||||
: FluentComponent(createRoot(parent)), mProps(std::move(props)) {
|
||||
if (mProps.onClose) {
|
||||
mRoot->SetAttribute("closable", "");
|
||||
auto& closeButton =
|
||||
add_child<Button>(Button::Props{}, "close").on_pressed([this] { mProps.onClose(); });
|
||||
closeButton.root()->SetInnerRML("");
|
||||
add_child<Button>(Button::Props{}, "close").on_pressed([this] { mProps.onClose(); });
|
||||
mEndSpacer = append(mRoot, "tab-end-spacer");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user