Change the resizer color when the window is being resized (#1120)

This commit is contained in:
toasted-nutbread 2020-12-18 12:06:39 -05:00 committed by GitHub
parent 5d8ac70395
commit f28fe33cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -1196,7 +1196,8 @@ button.action-button {
fill var(--animation-duration) linear, fill var(--animation-duration) linear,
opacity var(--animation-duration) linear; opacity var(--animation-duration) linear;
} }
.frame-resizer-handle:hover { .frame-resizer-handle:hover,
:root[data-is-resizing=true] .frame-resizer-handle {
fill: var(--accent-color); fill: var(--accent-color);
opacity: 1; opacity: 1;
} }

View File

@ -1868,6 +1868,11 @@ class Display extends EventDispatcher {
this._frameResizeEventListeners.addEventListener(window, 'blur', this._onFrameResizerWindowBlur.bind(this), false); this._frameResizeEventListeners.addEventListener(window, 'blur', this._onFrameResizerWindowBlur.bind(this), false);
this._frameResizeEventListeners.addEventListener(window, 'mousemove', this._onFrameResizerMouseMove.bind(this), false); this._frameResizeEventListeners.addEventListener(window, 'mousemove', this._onFrameResizerMouseMove.bind(this), false);
const {documentElement} = document;
if (documentElement !== null) {
documentElement.dataset.isResizing = 'true';
}
this._initializeFrameResize(token); this._initializeFrameResize(token);
} }
@ -1884,6 +1889,11 @@ class Display extends EventDispatcher {
this._frameResizeStartSize = null; this._frameResizeStartSize = null;
this._frameResizeStartOffset = null; this._frameResizeStartOffset = null;
this._frameResizeToken = null; this._frameResizeToken = null;
const {documentElement} = document;
if (documentElement !== null) {
delete documentElement.dataset.isResizing;
}
} }
async _updateFrameSize(x, y) { async _updateFrameSize(x, y) {