mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-10 21:00:55 -04:00
UI: Use decorator: text for close button
This commit is contained in:
Vendored
+1
-1
Submodule extern/aurora updated: 77ad549530...0d05404564
@@ -61,12 +61,10 @@ tab-bar[closable] close {
|
||||
font-family: "Material Symbols Rounded";
|
||||
font-weight: normal;
|
||||
font-size: 24dp;
|
||||
line-height: 48dp;
|
||||
text-align: center;
|
||||
text-transform: none;
|
||||
color: rgba(224, 219, 200, 70%);
|
||||
backdrop-filter: blur(2dp);
|
||||
border-radius: 6dp;
|
||||
decorator: text("" center center);
|
||||
transition: color background-color 0.12s linear-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -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