Age | Commit message (Collapse) | Author |
|
Some buttons control how their text is set in unique ways. For example,
GUI::ToolbarButton will set only its tooltip instead of its text if it
has an icon. So when the text changes, ToolbarButton will want to change
its tooltip instead.
|
|
This reverts commit e20756f9f735187f481420947329dfdb9a3418ac.
Some buttons, e.g. GUI::ToolbarButton, set text to be used only as a
tooltip instead of text on the button itself. This commit forced those
buttons to have text on them when their action became set. For most
toolbars, this was an invisible side effect; the button icons covered
the whole button rect. But the toolbar for EmojiInputDialog has slightly
smaller icons, causing an ellipsis to be displayed next to the icon.
|
|
This allows Actions that change based on some state to update their
associated buttons' text and tooltips to match their new text. The
play/pause button in SoundPlayer (and VideoPlayer if it's merged)
will now change tooltips when the playback changes state, rather than
always displaying "Play (Space)".
|
|
|
|
This prevents items from being put in the overflow menu, even though
there is still enough space for all items to be shown, because the
overflow button does not take up space when it is not needed.
|
|
When items are sent to the overflow menu one by one, it can happen that
buttons that are heavily related, and don't make sense without one
another (either visually or logically) are separated.
This new option enables the developer to choose the "grouping"
behavior, of sending all items that are not separated to the overflow
menu together, as soon as one of them doesn't have enough space to be
displayed. (provided the toolbar is set as collapsible)
|
|
Instead of letting buttons determine the relative position
of their menus, a workaround only used by Statusbar segments,
open them all uniformly for a nice, consistent UI.
Passing a rect to popup() now routes to open_button_menu(), an
analog to open_menubar_menu(), which adjusts the menu's popup
position in the same way. Fixes button menus obscuring the buttons
which spawn them and jutting out at odd corners depending on screen
position.
|
|
Previously Toolbars were governed by a strict minimum size which
guaranteed all actions remained visible. Now, if set collapsible,
extra actions will fold into an overflow menu on the Toolbar.
|
|
And assume 24x24 button sizes by default.
There currently aren't any toolbars with custom button sizes, but if
the need arises, they can always determine their own padding.
|
|
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
|
|
|
|
|
|
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."
|
|
|
|
This is a fallible variant of add_separator() that returns ErrorOr.
|
|
This is a fallible variant of add_action() that returns ErrorOr.
It's careful to not fail with a partially added action.
|
|
Toolbar buttons are meant for quick mouse access to common actions,
while quick keyboard access is normally achieved via keyboard shortcuts
and underlined menu items.
This makes interfaces with many toolbar buttons (e.g GUI::FilePicker)
a lot nicer to navigate via keyboard.
|
|
Previously there was no easy way for clients to access the button.
|
|
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 *
|
|
Now you'll get the same event whether you hover an action in a menu
or in a toolbar. :^)
|
|
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:
- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar
This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
|