Initial commit in branch develop

This commit is contained in:
Wolfgang R 2014-08-20 02:25:47 +02:00
parent c8594936fa
commit 156e007969
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,53 @@
const St = imports.gi.St;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
let text, button;
function _hideHello() {
Main.uiGroup.remove_actor(text);
text = null;
}
function _showHello() {
if (!text) {
text = new St.Label({ style_class: 'helloworld-label', text: "Hello, world!" });
Main.uiGroup.add_actor(text);
}
text.opacity = 255;
let monitor = Main.layoutManager.primaryMonitor;
text.set_position(Math.floor(monitor.width / 2 - text.width / 2),
Math.floor(monitor.height / 2 - text.height / 2));
Tweener.addTween(text,
{ opacity: 0,
time: 2,
transition: 'easeOutQuad',
onComplete: _hideHello });
}
function init() {
button = new St.Bin({ style_class: 'panel-button',
reactive: true,
can_focus: true,
x_fill: true,
y_fill: false,
track_hover: true });
let icon = new St.Icon({ icon_name: 'system-run-symbolic',
style_class: 'system-status-icon' });
button.set_child(icon);
button.connect('button-press-event', _showHello);
}
function enable() {
Main.panel._rightBox.insert_child_at_index(button, 2);
}
function disable() {
Main.panel._rightBox.remove_child(button);
}

View file

@ -0,0 +1,6 @@
{
"shell-version": ["3.12.2"],
"uuid": "randomwallpaper@iflow.productions",
"name": "Random Wallpaper",
"description": "Fetches random wallpaper from desktopper.co and sets it as desktop background"
}

View file

@ -0,0 +1,9 @@
.helloworld-label {
font-size: 36px;
font-weight: bold;
color: #ffffff;
background-color: rgba(10,10,10,0.7);
border-radius: 5px;
padding: .5em;
}