MCPcopy Index your code
hub / github.com/material-shell/material-shell / toggleOverview

Method toggleOverview

src/layout/main.ts:321–359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

319 }
320
321 toggleOverview(): void {
322 if (this.overviewShown) {
323 this.overviewShown = false;
324 this.primaryMonitorContainer.workspaceContainer.ease_property(
325 '@effects.dimmer.brightness',
326 Clutter.Color.new(127, 127, 127, 255),
327 {
328 duration: 300,
329 mode: Clutter.AnimationMode.EASE_OUT_QUAD,
330 onComplete: () => {
331 this.primaryMonitorContainer.workspaceContainer.clear_effects();
332 },
333 }
334 );
335 Me.msWindowManager.msFocusManager.popModal(this);
336 } else {
337 this.overviewShown = true;
338 Me.msWindowManager.msFocusManager.pushModal(this, {
339 actionMode: Shell.ActionMode.OVERVIEW,
340 });
341
342 const dimmerEffect = new Clutter.BrightnessContrastEffect({
343 name: 'dimmer',
344 brightness: Clutter.Color.new(127, 127, 127, 255),
345 });
346 this.primaryMonitorContainer.workspaceContainer.add_effect(
347 dimmerEffect
348 );
349 this.primaryMonitorContainer.workspaceContainer.ease_property(
350 '@effects.dimmer.brightness',
351 Clutter.Color.new(90, 90, 90, 255),
352 {
353 duration: 300,
354 mode: Clutter.AnimationMode.EASE_IN_QUAD,
355 }
356 );
357 }
358 this.panel.toggle();
359 }
360
361 // eslint-disable-next-line camelcase
362 add_child(actor: Clutter.Actor) {

Callers 4

registerToSignalsMethod · 0.95
constructorMethod · 0.80
registerProviderMethod · 0.80
resetAndCloseMethod · 0.80

Calls 5

clear_effectsMethod · 0.80
popModalMethod · 0.80
pushModalMethod · 0.80
add_effectMethod · 0.80
toggleMethod · 0.80

Tested by

no test coverage detected