Age | Commit message (Collapse) | Author |
|
|
|
Previously we would try setting the tab index regardless if that tab
actually existed, resulting in Browser crashing by either pressing
Control + N or using the CommandPalette.
|
|
Add vertical tabs to TabWidget, this can be set using
the ```TabWidget::set_tab_position``` function or in the GML
|
|
- close_button_enabled
- show_tab_bar
- reorder_allowed
|
|
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. :^)
|
|
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
|
|
|
|
Ultimately we'd like the caller to provide a String if possible (instead
of a StringView) as we're going to end up storing it.
|
|
This is a fallible variant of add_tab<T>(...) that returns ErrorOr.
|
|
|
|
|
|
|
|
Previously it was using int for indexes and using the -1 magic value.
Supersedes b9d51b86015e8410a2082c42f95651c0599ec7ae
|
|
This adds an optional close button to tabs, useful in
for example browser and pixelpaint.
|
|
Instead of having a single uniform margin around the child content of
a TabWidget, use a GUI::Margins to allow individual per-edge margins.
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
The last uniform-sized tab button would bleed outside the tab bar area
due to us not taking the bar margin into account.
|
|
|
|
|