This is useful, for instance, in games in which you can switch held
items using the scroll wheel. In order to implement this, they
previously would have to either add a hard-coded division by 4, or look
up your mouse settings to adjust correctly.
This commit adds an MouseEvent.wheel_raw_delta_x() and
MouseEvent.wheel_raw_delta_y().
It seems like this happens in quite some valid situations, so my
initially sensible failsafe doesn't make sense. As the buffer system is
hopefully gone soon, it won't be an issue in the future either way.
This was regressed at some point though I never saw it working.
Basically, while jump to slider works correctly it doesn't even get
actioned. While the user is clicking the slider it's very likely that a
buffer finishes playing and the callback for that changes the slider
value. This means that the user click just gets lost. There's some
additional weird behavior where values are lost in even more cases, so
an additional fix that is needed is to store the slider value in the
AutoSlider while we're dragging and apply it on mouse up.
This converts the return value of File::read_link() from String to
ErrorOr<String>.
The rest of the change is to support the potential of an Error being
returned and subsequent release of the value when no Error is returned.
Unfortunately at this stage none of the places affected can utililize
our TRY() macro.
Previously only the list of allowed keymaps could be modified and
applied to the system.
Add a new button to activate the selected keymap from the list. When
applying the changes to the system, also apply the active keymap.
ImageViewer and PixelPaint would crash when the ImageDecoderClient
returns a frame without a bitmap. This can happen with `.ico` files
with an unsupported BPP, for example.
GlyphMapWidget now reports context menu requests when secondary
clicking the map. This also adds a new Select All action and updates
the Copy Character action to work on multi-glyph selections. Glyph
navigation actions have been moved to a separate Go menu, as is
common in other apps.
These can be generated by saving something that's not serialisable (e.g.
functions), skip over them and let the load logic reevaluate them when
needed.
Take into account the current scroll position when calculating the
position of cells. This way when the user scrolls either horizontally
or vertically, the calculations done to find the cell position
will be correct.
When the drop location of a drag-and-drop operation is not valid, then
don't continue with the drop_event. For example, if the ending location
is the header row or header column, or is outside of the table, then
should not continue.
Implements ability to extend a cell's contents by clicking the bottom
right of the cell and dragging in a linear direction. For now, the
content that is extended is simply a copy of the target cell's
values.
Since copying and cutting uses the cell values in the origin to decide
which values to paste in the destination, it is necessary to do it
in an ordered manner when the origin and destination ranges overlap.
Otherwise you may overwrite values in the origin unintentionally
before having successfully transferred them to the destination.
Use cut instead of copy when dragging one or many cells' contents.
This is more intuitive as most other spreadsheet applications
handle the drag in this manner instead of as a copy operation.
When finished dragging and cutting, select the cells in the
destination. E.g. if you select 5 cells and drag and paste
them in a new location, select the 5 pasted cells in the
destination.
Due to the fact that in the AbstractView, when multiple cells are
selected, and then another cell is selected within this selection,
the cursor is not updated as the user may be beginning to drag, have
to override this functionality for the Spreadsheet application.
This is because in spreadsheets when multiple cells are selected,
and then you click on one of the cells within the selection,
the selection should be cleared and the targetted cell highlighted.
Due to the margin that is given to be able to select cells for
cutting or extending, have to override the mouse click function
so that the targetted cell is chosen and not the one that may be
beneath the cursor.
Depending on the cursor location with respect to a selected cell,
display different icons pertaining to the distinct possible actions,
for example dragging and cutting, extending the cell's contents, or
doing a simple selection.
If the previous active glyph is outside the currently selected
block range, reset GlyphMap to show all glyphs. This is less
disorienting when undoing changes outside the visible range.
Previously the glyph undo stack saved an array of bytes representing
the restore state of an individual glyph when modified. Now the
selection undo stack saves a byte buffer of the entire selection,
letting us restore changes to multiple glyphs at once.
It makes no sense to require passing a global object and doing a stack
space check in some cases where running out of stack is highly unlikely,
we can't recover from errors, and currently ignore the result anyway.
This is most commonly in constructors and when setting things up, rather
than regular function calls.
This expands the previously added settings for the asymmetric radii of
th FastBoxBlurFilter to allow the user to specify an angle and the
desired magnitude of blur.
The given values are then calculated forward to corresponding x and y
blur radii.
This way the preview image is not generated on _every_ update_preview()
call but rather only if the last update_preview() was longer than 100ms
ago.
When rapidly moving the Slider for large blur values in the
FastBoxBlurFilter with the Gaussian approximation the usage became
noticeably sliggush because we queued a lot of preview generation just
to throw it away immediately. This patch fixes that.
This adds the default behavior of search and highlighting of
abstractView to the inspectorWidget. Search results are based on
the titles in the first columns.