File: calendar.js

package info (click to toggle)
cinnamon 6.4.13-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,304 kB
  • sloc: javascript: 54,298; ansic: 51,499; python: 21,971; xml: 2,803; sh: 96; makefile: 27; perl: 13
file content (29 lines) | stat: -rw-r--r-- 840 bytes parent folder | download | duplicates (9)
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
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-

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

const Calendar = imports.ui.calendar;
const UI = imports.testcommon.ui;

UI.init();
let stage = Clutter.Stage.get_default();
stage.width = stage.height = 400;
stage.show();

let vbox = new St.BoxLayout({ vertical: true,
                              width: stage.width,
                              height: stage.height,
                              style: 'padding: 10px; spacing: 10px; font: 15px sans-serif;' });
stage.add_actor(vbox);

let calendar = new Calendar.Calendar();
vbox.add(calendar.actor,
         { expand: true,
           x_fill: false, x_align: St.Align.MIDDLE,
           y_fill: false, y_align: St.Align.START });

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