mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 09:00:38 +08:00
[runtime] Frameless resize now sets the cursor on documentElement (#2289)
Otherwise if the body does not cover the full viewport the cursor won't be shown outside of its rectangle.
This commit is contained in:
parent
8e4606d104
commit
05679e70d0
@ -123,7 +123,7 @@ window.addEventListener('mousedown', (e) => {
|
||||
});
|
||||
|
||||
function setResize(cursor) {
|
||||
document.body.style.cursor = cursor || window.wails.flags.defaultCursor;
|
||||
document.documentElement.style.cursor = cursor || window.wails.flags.defaultCursor;
|
||||
window.wails.flags.resizeEdge = cursor;
|
||||
}
|
||||
|
||||
@ -141,10 +141,10 @@ window.addEventListener('mousemove', function (e) {
|
||||
return;
|
||||
}
|
||||
if (window.wails.flags.defaultCursor == null) {
|
||||
window.wails.flags.defaultCursor = document.body.style.cursor;
|
||||
window.wails.flags.defaultCursor = document.documentElement.style.cursor;
|
||||
}
|
||||
if (window.outerWidth - e.clientX < window.wails.flags.borderThickness && window.outerHeight - e.clientY < window.wails.flags.borderThickness) {
|
||||
document.body.style.cursor = "se-resize";
|
||||
document.documentElement.style.cursor = "se-resize";
|
||||
}
|
||||
let rightBorder = window.outerWidth - e.clientX < window.wails.flags.borderThickness;
|
||||
let leftBorder = e.clientX < window.wails.flags.borderThickness;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
- Improved fullscreen mode for frameless window on Windows. Changed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2279)
|
||||
- On Windows unmaximising a window has no effect anymore when the window is in fullscreen mode, this makes it consistent with e.g. macOS. Changed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2279)
|
||||
- Frameless resize now sets the cursor on documentElement, otherwise resizing cursor won't be shown outside of the body rectangle. Changed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2289)
|
||||
|
||||
### Fixed
|
||||
- Fixed failing build hooks when `build/bin` was missing. Fixed by @Lyimmi in [PR](https://github.com/wailsapp/wails/pull/2273)
|
||||
|
Loading…
Reference in New Issue
Block a user