ladybird/Userland/Applications/Help/HelpWindow.gml
kleines Filmröllchen 7e34b88ed4 LibGUI: Fully support TabWidget in GML
TabWidgets couldn't be used in GML properly, as the GML creation
routines didn't actually call the necessary functions in the TabWidget
to get a new tab added. This commit fixes that by making the name of the
tab a normal property, the previously introduced "title", which can be
trivially set from GML. Therefore, try_add_widget() loses an argument
(while try_add_tab doesn't, because it newly constructs the widget).
This allows us to get rid of the silly "fixing my widget tree after the
fact" code in Help and will make it super easy to use TabWidget in
future GML. :^)
2022-04-03 12:21:05 +02:00

52 lines
1.1 KiB
Text

@GUI::Widget {
fill_with_background_color: true
layout: @GUI::VerticalBoxLayout {
spacing: 2
}
@GUI::ToolbarContainer {
@GUI::Toolbar {
name: "toolbar"
}
}
@GUI::HorizontalSplitter {
layout: @GUI::HorizontalBoxLayout {
spacing: 4
}
@GUI::TabWidget {
name: "tab_widget"
fixed_width: 200
container_margins: [6]
@GUI::TreeView {
name: "browse_view"
title: "Browse"
}
@GUI::Widget {
name: "search_container"
title: "Search"
layout: @GUI::VerticalBoxLayout {}
@GUI::TextBox {
name: "search_box"
placeholder: "Search"
}
@GUI::ListView {
name: "search_view"
}
}
}
@Web::OutOfProcessWebView {
name: "web_view"
}
}
@GUI::Statusbar {
name: "statusbar"
}
}