Sidebar uses icons for apps

This commit is contained in:
James Babcock committed 2026-07-08 10:45:56 -07:00
1 parent d0c30f9ca9
commit 22c779553c
27 files changed
+379 -37

No files matched your search

+15 -1
View File
@@ -57,8 +57,17 @@ export class LayerStack {
private readonly ctx: LayerContext;
private readonly baseWidth: number;
private readonly baseHeight: number;
private readonly focusedFn: () => boolean;
constructor(baseLayer: Layer, actions: LayerActions, baseSize?: { width: number; height: number }) {
constructor(
baseLayer: Layer,
actions: LayerActions,
baseSize?: { width: number; height: number },
// Whether this stack is the current input target; drives the strength of
// selection highlights (a visible-but-unfocused window dims its selection).
// Defaults to always-focused for shell overlays and standalone stacks.
isFocused: () => boolean = () => true,
) {
this.layers = [baseLayer];
this.ctx = {
stack: this,
@@ -66,6 +75,11 @@ export class LayerStack {
};
this.baseWidth = baseSize?.width ?? G2_LENS_WIDTH;
this.baseHeight = baseSize?.height ?? G2_LENS_HEIGHT;
this.focusedFn = isFocused;
}
isFocused(): boolean {
return this.focusedFn();
}
push(layer: Layer): void {