| Commit message (Collapse) | Author | Files | Lines |
|
|
|
- Adds the `selectable` to the rich and markdown examples.
- Remove debug code from name example and make it simpler without the
`selectable` so users know that the `selectable` is optional.
|
|
- Make the `global_selection` operation check for the new
`IndependentSelection` when trying to downcast_mut.
- `IndependentSelection` uses wraps a `RefCell` so it can change its
inner value. Theres some helper methods to create this
`IndependentSelection` from an existing value and to then get the
changed value once the operation is done. This way the `Text` and
`Rich` simply need to pass this `IndependentSelection` to the
operation `custom` method which will make sure it wont clash with any
other custom operations that could be using `&mut bool` as well.
|
|
|
|
|
|
- This commit implements the selection across bounds, which is it allows
a selection to start out of bounds and allows a selection that started
on another widget to be dragged in bounds and select multiple
different widgets. However in order to get the copy working on
`ctrl/cmd + c` it resorts to a hacky solution where each widget clears
the clipboard when a drag movement comes into its bounds and when the
user presses `ctrl/cmd + c` it appends it's selected text to the
clipboard.
|
|
|
|
|
|
|
|
|
|
- The logic for graphemes with multiple codepoints was working when they
were on a single visual line, however on multiple visual lines the
lines after the one that contained such grapheme weren't taking that
into consideration.
|
|
- We continue to use the graphemes index for the selection ends, however
when calculating the selection rectangles we now check if the visual
line had any glyph with `start` and `end` index bigger than 1 before
or within the range and update the range accordingly. This way all the
code that checks for word boundaries when selecting by words still
functions properly.
|
|
- If we were dragging a selection and move the mouse out of bounds of
the text widget and an the same time it went out of bounds of a parent
scrollable, the cursor would be levitated so we weren't getting it's
cursor position. Now we land the cursor before checking the position.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
support, disable wrapping
|
|
|