File: background-repeat.js

package info (click to toggle)
cinnamon 6.4.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,300 kB
  • sloc: javascript: 54,298; ansic: 51,499; python: 21,971; xml: 2,803; sh: 96; makefile: 27; perl: 13
file content (33 lines) | stat: -rw-r--r-- 919 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-

const Clutter = imports.gi.Clutter;
const St = imports.gi.St;

const UI = imports.testcommon.ui;

UI.init();
let stage = Clutter.Stage.get_default();
stage.width = 640;
stage.height = 480;

let vbox = new St.BoxLayout({ width: stage.width,
                              height: stage.height,
                              style: 'background: #ffee88;' });
stage.add_actor(vbox);

let scroll = new St.ScrollView();
vbox.add(scroll, { expand: true });

let vbox = new St.BoxLayout({ vertical: true,
                              style: 'padding: 10px;'
                                     + 'spacing: 20px;' });
scroll.add_actor(vbox);

let contents = new St.Bin({ width: 1000, height: 1000,
                                   style_class: 'background-image background-repeat' });
vbox.add_actor(contents);


stage.show();
Clutter.main();
stage.destroy();