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>
(cherry picked from commit d0b2351036)
This commit is contained in:
parent
b7ddc8527f
commit
95a2ea93ad
1 changed files with 2 additions and 2 deletions
|
|
@ -438,13 +438,13 @@ var 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