Move drawing functions from shell-global into new shell-drawing.c file
Just to avoid shell-global.c bloat.
This commit is contained in:
@ -497,11 +497,11 @@ WellDisplayItem.prototype = {
|
||||
if (this._windows.length > 0) {
|
||||
let glow = new Shell.DrawingArea({});
|
||||
glow.connect('redraw', Lang.bind(this, function (e, tex) {
|
||||
Shell.Global.clutter_cairo_texture_draw_glow(tex,
|
||||
GLOW_COLOR.red / 255,
|
||||
GLOW_COLOR.green / 255,
|
||||
GLOW_COLOR.blue / 255,
|
||||
GLOW_COLOR.alpha / 255);
|
||||
Shell.draw_glow(tex,
|
||||
GLOW_COLOR.red / 255,
|
||||
GLOW_COLOR.green / 255,
|
||||
GLOW_COLOR.blue / 255,
|
||||
GLOW_COLOR.alpha / 255);
|
||||
}));
|
||||
this._name.connect('notify::allocation', Lang.bind(this, function (n, alloc) {
|
||||
let x = this._name.x;
|
||||
|
@ -258,12 +258,12 @@ Dash.prototype = {
|
||||
|
||||
dashPane.append(dashBackground, Big.BoxPackFlags.EXPAND);
|
||||
|
||||
let dashLeft = global.create_horizontal_gradient(DASH_LEFT_COLOR,
|
||||
DASH_MIDDLE_COLOR);
|
||||
let dashRight = global.create_horizontal_gradient(DASH_MIDDLE_COLOR,
|
||||
DASH_RIGHT_COLOR);
|
||||
let dashShadow = global.create_horizontal_gradient(SHADOW_COLOR,
|
||||
TRANSPARENT_COLOR);
|
||||
let dashLeft = Shell.create_horizontal_gradient(DASH_LEFT_COLOR,
|
||||
DASH_MIDDLE_COLOR);
|
||||
let dashRight = Shell.create_horizontal_gradient(DASH_MIDDLE_COLOR,
|
||||
DASH_RIGHT_COLOR);
|
||||
let dashShadow = Shell.create_horizontal_gradient(SHADOW_COLOR,
|
||||
TRANSPARENT_COLOR);
|
||||
dashShadow.set_width(SHADOW_WIDTH);
|
||||
|
||||
dashBackground.append(dashLeft, Big.BoxPackFlags.EXPAND);
|
||||
@ -424,12 +424,12 @@ Dash.prototype = {
|
||||
border_color: DASH_BORDER_COLOR });
|
||||
this._resultsPane.add_actor(resultsBackground);
|
||||
|
||||
let resultsLeft = global.create_horizontal_gradient(PANE_LEFT_COLOR,
|
||||
PANE_MIDDLE_COLOR);
|
||||
let resultsRight = global.create_horizontal_gradient(PANE_MIDDLE_COLOR,
|
||||
PANE_RIGHT_COLOR);
|
||||
let resultsShadow = global.create_horizontal_gradient(SHADOW_COLOR,
|
||||
TRANSPARENT_COLOR);
|
||||
let resultsLeft = Shell.create_horizontal_gradient(PANE_LEFT_COLOR,
|
||||
PANE_MIDDLE_COLOR);
|
||||
let resultsRight = Shell.create_horizontal_gradient(PANE_MIDDLE_COLOR,
|
||||
PANE_RIGHT_COLOR);
|
||||
let resultsShadow = Shell.create_horizontal_gradient(SHADOW_COLOR,
|
||||
TRANSPARENT_COLOR);
|
||||
resultsShadow.set_width(SHADOW_WIDTH);
|
||||
|
||||
resultsBackground.append(resultsLeft, Big.BoxPackFlags.EXPAND);
|
||||
@ -460,12 +460,12 @@ Dash.prototype = {
|
||||
|
||||
this._detailsPane.append(detailsBackground, Big.BoxPackFlags.EXPAND);
|
||||
|
||||
let detailsLeft = global.create_horizontal_gradient(PANE_LEFT_COLOR,
|
||||
PANE_MIDDLE_COLOR);
|
||||
let detailsRight = global.create_horizontal_gradient(PANE_MIDDLE_COLOR,
|
||||
PANE_RIGHT_COLOR);
|
||||
let detailsShadow = global.create_horizontal_gradient(SHADOW_COLOR,
|
||||
TRANSPARENT_COLOR);
|
||||
let detailsLeft = Shell.create_horizontal_gradient(PANE_LEFT_COLOR,
|
||||
PANE_MIDDLE_COLOR);
|
||||
let detailsRight = Shell.create_horizontal_gradient(PANE_MIDDLE_COLOR,
|
||||
PANE_RIGHT_COLOR);
|
||||
let detailsShadow = Shell.create_horizontal_gradient(SHADOW_COLOR,
|
||||
TRANSPARENT_COLOR);
|
||||
detailsShadow.set_width(SHADOW_WIDTH);
|
||||
|
||||
detailsBackground.append(detailsLeft, Big.BoxPackFlags.EXPAND);
|
||||
|
@ -162,9 +162,9 @@ ClockWidget.prototype = {
|
||||
|
||||
_updateCairo: function(time) {
|
||||
let global = Shell.Global.get();
|
||||
global.clutter_cairo_texture_draw_clock(this.collapsedActor,
|
||||
time.getHours() % 12,
|
||||
time.getMinutes());
|
||||
Shell.draw_clock(this.collapsedActor,
|
||||
time.getHours() % 12,
|
||||
time.getMinutes());
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user