mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
Remove the `this.actor = ...` and `this.actor._delegate = this` patterns in most of classes, by inheriting all the actor container classes. Uses interfaces when needed for making sure that multiple classes will implement some required methods or to avoid redefining the same code multiple times. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
28 lines
934 B
JavaScript
28 lines
934 B
JavaScript
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
|
const UI = imports.testcommon.ui;
|
|
|
|
const { Clutter, St } = imports.gi;
|
|
|
|
function test() {
|
|
let stage = new Clutter.Stage({ width: 400, height: 400 });
|
|
UI.init(stage);
|
|
|
|
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);
|
|
|
|
// Calendar can only be imported after Environment.init()
|
|
const Calendar = imports.ui.calendar;
|
|
let calendar = new Calendar.Calendar();
|
|
vbox.add(calendar,
|
|
{ expand: true,
|
|
x_fill: false, x_align: St.Align.MIDDLE,
|
|
y_fill: false, y_align: St.Align.START });
|
|
calendar.setEventSource(new Calendar.EmptyEventSource());
|
|
|
|
UI.main(stage);
|
|
}
|
|
test();
|