Having the return key sometimes press the equal button when nothing is
focused and press a different button when there is focus felt confusing.
The equal button is still able to be focused for the tab cycle to have
something to go to in order to jump out of the textbox but no other
keypad button can be focused now.
The previous code never executed, as SpreadsheetView splits selection
events into `on_selection_changed` and `on_selection_dropped` depending
on whether there is any selection.
Prior to this commit, there was a set_filename() function that could set
the window title, but actually it never did that. It was called only
in one place -- by the 'Save as...' action, but it always failed to
change anything, because there was a check that tried to reassign
the same filename. :/
This patch:
1. removes that check, and therefore
2. renames the function to simply `update_window_title()`,
3. starts calling the function from more places (at startup and after
loading a file),
4. changes the window title order
(`{app_name} - {filename}` -> `{filename} - {app_name}`) to match
the other applications style on the system. :^)
Display the album cover for the current playing song in the
visualization area for the "None" Visualization.
For now only "cover.png" and "cover.jpg" are looked for in the same
directory for the album cover image.
When no cover image is found the serenity background is shown instead as
a fallback.
This adds a new start_new_file() function to VisualizationWidget which
is called when the player starts a new file, passing the filename of the
file. This allows VisualizationWidget subclasses to do any setup needed
when a new file is started.
When the bars visualization receives a new buffer, it checks if it needs
a new buffer, which is only the case after it has repainted. However,
after then setting m_is_using_last, which is the flag for this, it
checks the buffer size of the passed buffer and returns if that is too
small. This means that if the visualizer receives a buffer that is too
small, and because of external circumstances the update doesn't run
after the buffer modification routine, the m_is_using_last variable is
stuck at true, which means that the visualization incorrectly believes
that the passed buffer is old and we need not update. This simply fixes
that by resetting m_is_using_last if the buffer we're passed is too
small, because in that case, we're clearly not using the last buffer
anymore.
Note: This bug is not exposed by the current SoundPlayer behavior. It
will become an issue with future changes, so we should fix it
regardless.
Up and down arrows now select search results. Matching index now
displays in full before filtering. Searching from the command
line focuses the query, and searches are now case insensitive.
Converts Help's layout to GML, propagates model and icon creation
errors, and switches to the MainWidget-namespace organization
pattern seen in more up-to-date apps like TextEditor to make things
easier to maintain going forward.
In the Keymap Settings dialog, a check was missing when the Keymap
selection dialog was cancelled.
Not checking the return value causes an empty string to be added to
the keymap list.
Up until now, the Spreadsheet function examples appeared below their
descriptions. Let's swap them to make it clearer which JS example
goes to which description.
If the underlying parameter is logarithmic, the slider respects that and
switches to a logarithmic display. Currently, the used base is e, and
we'll have to see in practice if 2 or 10 might be better. The parameters
that make use of this, as can be seen in the previous commit, are all of
the time dependent parameters such as the synth envelope parameters, as
with these, usually fine-grained control at small time scales and
coarser control at large time scales is desired.
This was a good opportunity to refactor the slider step count into a
constant.
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
Segments inherit from Button and let us add clickable widgets
to status bars. This patch also adds proportional, fixed and
autosized modes for segments and lets the status bar consume
all non-clickable segments for override text.