Read scope opacity for share links from the mask, as feather is

The share state took the opacity the slider last showed, which a
show-only update can leave apart from the mask; it now reads the mask
itself, as the feather does. The test reset also restores full opacity.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-14 15:31:33 -08:00
1 parent 5383b470ee
commit 471151910d
3 files changed
+5 -1

No files matched your search

+1
View File
@@ -591,6 +591,7 @@ export function _resetScopeMaskForTest() {
_viewer = null; _viewer = null;
_enabled = true; _enabled = true;
_featherRatio = SCOPE_FEATHER_RATIO_DEFAULT; _featherRatio = SCOPE_FEATHER_RATIO_DEFAULT;
_maskOpacity = 1;
_terminusAlpha = SCOPE_OUTSIDE_ALPHA; _terminusAlpha = SCOPE_OUTSIDE_ALPHA;
_terminusOverride = null; _terminusOverride = null;
_terminusRepaints = 0; _terminusRepaints = 0;
+1
View File
@@ -226,6 +226,7 @@ export class StyleManager extends ShellFacade {
getDetectionTuning: services.getDetectionTuning, getDetectionTuning: services.getDetectionTuning,
getKeyholeFadeTuning: services.getKeyholeFadeTuning, getKeyholeFadeTuning: services.getKeyholeFadeTuning,
getScopeMaskFeather: services.getScopeMaskFeather, getScopeMaskFeather: services.getScopeMaskFeather,
getScopeMaskOpacity: services.getScopeMaskOpacity,
getScopeTerminusOverride: services.getScopeTerminusOverride, getScopeTerminusOverride: services.getScopeTerminusOverride,
governorRequestRender: services.governorRequestRender, governorRequestRender: services.governorRequestRender,
holdContinuousRender: services.holdContinuousRender, holdContinuousRender: services.holdContinuousRender,
+3 -1
View File
@@ -225,6 +225,7 @@ export class VisualSettings {
// What the Scope and Celestial controls show; null until first set. // What the Scope and Celestial controls show; null until first set.
this._scopeEnabledShown = null; this._scopeEnabledShown = null;
this._scopeFeatherShown = null; this._scopeFeatherShown = null;
this._scopeOpacityShown = null;
this._celestialShown = null; this._celestialShown = null;
this.activeStyle = 'normal'; this.activeStyle = 'normal';
this._preCyberStyle = null; this._preCyberStyle = null;
@@ -895,6 +896,7 @@ export class VisualSettings {
getDetectionTuning, getDetectionTuning,
isScopeMaskEnabled, isScopeMaskEnabled,
getScopeMaskFeather, getScopeMaskFeather,
getScopeMaskOpacity,
getScopeTerminusOverride, getScopeTerminusOverride,
} = this.services; } = this.services;
const detection = this._shareableDetectionState(); const detection = this._shareableDetectionState();
@@ -915,7 +917,7 @@ export class VisualSettings {
celestialRingEnabled: this.celestialRingEnabled, celestialRingEnabled: this.celestialRingEnabled,
scopeEnabled: isScopeMaskEnabled(), scopeEnabled: isScopeMaskEnabled(),
scopeFeatherPct: Math.round(getScopeMaskFeather() * 100), scopeFeatherPct: Math.round(getScopeMaskFeather() * 100),
scopeOpacityPct: this._scopeOpacityShown ?? 100, scopeOpacityPct: Math.round((getScopeMaskOpacity?.() ?? 1) * 100),
// null when adaptive — the share layer omits `sce` entirely in that case. // null when adaptive — the share layer omits `sce` entirely in that case.
scopeTerminusPct: scopeTerminusPct:
getScopeTerminusOverride() == null getScopeTerminusOverride() == null