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

Method showSplashScreens

src/extension.ts:234–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232 }
233
234 showSplashScreens() {
235 log('show splashscreen');
236 splashscreenCalled = true;
237 Main.layoutManager.monitors.forEach((monitor) => {
238 const icon = new St.Icon({
239 gicon: Gio.icon_new_for_string(
240 `${this.metadata.path}/assets/icons/on-dark-small.svg`
241 ),
242 icon_size: 200,
243 });
244 const splashscreen = new St.Bin({
245 style_class: 'ms-splashscreen',
246 style: 'background: rgb(25,25,25)',
247 child: icon,
248 x: monitor.x,
249 y: monitor.y,
250 width: monitor.width,
251 height: monitor.height,
252 });
253 Main.layoutManager.addChrome(splashscreen);
254 splashScreens.push(splashscreen);
255 });
256 _splashscreenTimeoutId = Async.addTimeout(
257 GLib.PRIORITY_DEFAULT,
258 5000,
259 () => {
260 _splashscreenTimeoutId = 0;
261 this.hideSplashScreens();
262 return GLib.SOURCE_REMOVE;
263 }
264 );
265 }
266
267 hideSplashScreens() {
268 if (splashScreens.length < 1) return GLib.SOURCE_REMOVE;

Callers 1

enableMethod · 0.95

Calls 4

hideSplashScreensMethod · 0.95
logFunction · 0.85
addTimeoutMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected