Port Lightbox to CSS and use it in runDialog
Make Lightbox stylable and add a common style. Use it in runDialog. https://bugzilla.gnome.org/show_bug.cgi?id=604978
This commit is contained in:
parent
bffadf1b6e
commit
72cb4bf346
@ -773,13 +773,13 @@ StTooltip {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.run-dialog-box {
|
|
||||||
background: rgba(0,0,0,0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.run-dialog {
|
.run-dialog {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border: 1px solid rgba(128,128,128,0.40);
|
border: 1px solid rgba(128,128,128,0.40);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: rgba(0,0,0,0.8);
|
background: rgba(0,0,0,0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lightbox {
|
||||||
|
background-color: rgba(0, 0, 0, 0.27);
|
||||||
|
}
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const St = imports.gi.St;
|
||||||
const Main = imports.ui.main;
|
|
||||||
const Tweener = imports.ui.tweener;
|
|
||||||
|
|
||||||
const SHADE_COLOR = new Clutter.Color();
|
|
||||||
SHADE_COLOR.from_pixel(0x00000044);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lightbox:
|
* Lightbox:
|
||||||
@ -38,11 +33,10 @@ Lightbox.prototype = {
|
|||||||
_init : function(container, inhibitEvents, width, height) {
|
_init : function(container, inhibitEvents, width, height) {
|
||||||
this._container = container;
|
this._container = container;
|
||||||
this._children = container.get_children();
|
this._children = container.get_children();
|
||||||
this.actor = new Clutter.Rectangle({ color: SHADE_COLOR,
|
this.actor = new St.Bin({ x: 0,
|
||||||
x: 0,
|
y: 0,
|
||||||
y: 0,
|
style_class: 'lightbox',
|
||||||
border_width: 0,
|
reactive: inhibitEvents });
|
||||||
reactive: inhibitEvents });
|
|
||||||
|
|
||||||
container.add_actor(this.actor);
|
container.add_actor(this.actor);
|
||||||
this.actor.raise_top();
|
this.actor.raise_top();
|
||||||
|
@ -13,6 +13,7 @@ const St = imports.gi.St;
|
|||||||
const Gettext = imports.gettext.domain('gnome-shell');
|
const Gettext = imports.gettext.domain('gnome-shell');
|
||||||
const _ = Gettext.gettext;
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
|
const Lightbox = imports.ui.lightbox;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const MAX_FILE_DELETED_BEFORE_INVALID = 10;
|
const MAX_FILE_DELETED_BEFORE_INVALID = 10;
|
||||||
@ -203,12 +204,13 @@ RunDialog.prototype = {
|
|||||||
x: 0, y: 0 });
|
x: 0, y: 0 });
|
||||||
global.stage.add_actor(this._group);
|
global.stage.add_actor(this._group);
|
||||||
|
|
||||||
this._box = new St.Bin({ style_class: 'run-dialog-box',
|
let lightbox = new Lightbox.Lightbox(this._group, true);
|
||||||
x_align: St.Align.MIDDLE,
|
|
||||||
y_align: St.Align.MIDDLE,
|
this._box = new St.Bin({ x_align: St.Align.MIDDLE,
|
||||||
reactive: true });
|
y_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
this._group.add_actor(this._box);
|
this._group.add_actor(this._box);
|
||||||
|
lightbox.highlight(this._box);
|
||||||
|
|
||||||
let dialogBox = new St.BoxLayout({ style_class: 'run-dialog', vertical: true });
|
let dialogBox = new St.BoxLayout({ style_class: 'run-dialog', vertical: true });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user