mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
boxpointer: Clamp alignments to expected range
The values are expected to be between 0 (start) and 1 (end), enforce that with appropriate clamp() calls. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3150>
This commit is contained in:
parent
4e70315fbb
commit
d0b2351036
1 changed files with 2 additions and 2 deletions
|
|
@ -446,13 +446,13 @@ export const BoxPointer = GObject.registerClass({
|
|||
() => (this._sourceActor = null), this);
|
||||
}
|
||||
|
||||
this._arrowAlignment = alignment;
|
||||
this._arrowAlignment = Math.clamp(alignment, 0.0, 1.0);
|
||||
|
||||
this.queue_relayout();
|
||||
}
|
||||
|
||||
setSourceAlignment(alignment) {
|
||||
this._sourceAlignment = alignment;
|
||||
this._sourceAlignment = Math.clamp(alignment, 0.0, 1.0);
|
||||
|
||||
if (!this._sourceActor)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue