mirror of
https://github.com/danbulant/cushy
synced 2026-06-17 13:31:07 +00:00
Fixing selecting before/after the text
This commit is contained in:
parent
459dc3f96a
commit
f0c1aec40e
2 changed files with 6 additions and 1 deletions
|
|
@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
`WindowAttributes::inner_size` is `None`.
|
||||
- Container's layout and drawing functions now properly round up/down the
|
||||
measurements to ensure accurate rendering. Fixes [#158][158].
|
||||
- `Input` selection handling when dragging below or above the text field is now
|
||||
handled correctly.
|
||||
|
||||
[158]: https://github.com/khonsulabs/cushy/issues/158
|
||||
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ where
|
|||
.round();
|
||||
let mut location = location - padding;
|
||||
if location.y < 0 {
|
||||
location.y = Px::ZERO;
|
||||
return Cursor::default();
|
||||
}
|
||||
if location.x < 0 {
|
||||
location.x = Px::ZERO;
|
||||
|
|
@ -885,6 +885,9 @@ where
|
|||
let relative = relative + rect.size / 2;
|
||||
|
||||
let line_height = cache.measured.line_height.get();
|
||||
if relative.y >= line_height {
|
||||
continue;
|
||||
}
|
||||
let xy = relative
|
||||
.x
|
||||
.get()
|
||||
|
|
|
|||
Loading…
Reference in a new issue