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

Method constructor

src/manager/layoutManager.ts:85–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 tilingInProgress: boolean | undefined;
84
85 constructor() {
86 super();
87 this.workspaceManager = global.workspace_manager;
88 this.layoutList = layouts;
89 this.layoutsSettings = getSettings('layouts');
90
91 this.observe(this.layoutsSettings, 'changed::gap', (schema) => {
92 this.gap = schema.get_int('gap');
93 this.emit('gap-changed');
94 this.tileWindows();
95 });
96
97 this.observe(
98 this.layoutsSettings,
99 'changed::use-screen-gap',
100 (schema) => {
101 this.useScreenGap = schema.get_boolean('use-screen-gap');
102 this.emit('gap-changed');
103 this.tileWindows();
104 }
105 );
106
107 this.observe(this.layoutsSettings, 'changed::screen-gap', (schema) => {
108 this.screenGap = schema.get_int('screen-gap');
109 this.emit('gap-changed');
110 this.tileWindows();
111 });
112 this.observe(this.layoutsSettings, 'changed::tween-time', (schema) => {
113 this.tweenTime = schema.get_double('tween-time');
114 });
115 this.observe(this.layoutsSettings, 'changed::ratio-value', (schema) => {
116 this.ratio = schema.get_double('ratio-value');
117 this.tileWindows();
118 });
119
120 this.ratio = this.layoutsSettings.get_double('ratio-value');
121 this.gap = this.layoutsSettings.get_int('gap');
122 this.useScreenGap = this.layoutsSettings.get_boolean('use-screen-gap');
123 this.screenGap = this.layoutsSettings.get_int('screen-gap');
124 this.tweenTime = this.layoutsSettings.get_double('tween-time');
125 }
126
127 get someGap() {
128 return this.gap != 0 || (this.useScreenGap && this.screenGap != 0);

Callers

nothing calls this directly

Calls 7

emitMethod · 0.95
tileWindowsMethod · 0.95
getSettingsFunction · 0.90
get_intMethod · 0.65
get_booleanMethod · 0.65
get_doubleMethod · 0.65
observeMethod · 0.45

Tested by

no test coverage detected