mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 07:05:30 +03:00
Misc whitespace clean ups in src (#686)
This commit is contained in:
parent
7a76ae3028
commit
42701bf833
@ -68,4 +68,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ namespace Gala {
|
||||
color_string = settings.get_string ("primary-color");
|
||||
var color = Clutter.Color.from_string (color_string);
|
||||
|
||||
color_string = settings.get_string("secondary-color");
|
||||
color_string = settings.get_string ("secondary-color");
|
||||
var second_color = Clutter.Color.from_string (color_string);
|
||||
|
||||
var shading_type = settings.get_enum ("color-shading-type");
|
||||
@ -224,7 +224,7 @@ namespace Gala {
|
||||
animation = yield BackgroundCache.get_default ().get_animation (filename);
|
||||
|
||||
if (animation == null || cancellable.is_cancelled ()) {
|
||||
set_loaded();
|
||||
set_loaded ();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ namespace Gala {
|
||||
var cache = Meta.BackgroundImageCache.get_default ();
|
||||
var image = cache.load (File.new_for_path (filename));
|
||||
if (image.is_loaded ())
|
||||
set_loaded();
|
||||
set_loaded ();
|
||||
else {
|
||||
ulong handler = 0;
|
||||
handler = image.loaded.connect (() => {
|
||||
@ -270,4 +270,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace Gala {
|
||||
var file = File.new_for_path (filename);
|
||||
try {
|
||||
var monitor = file.monitor (FileMonitorFlags.NONE, null);
|
||||
monitor.changed.connect(() => {
|
||||
monitor.changed.connect (() => {
|
||||
file_changed (filename);
|
||||
});
|
||||
|
||||
|
@ -80,5 +80,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -177,4 +177,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,4 +172,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace Gala {
|
||||
var image = cache.load (background_file);
|
||||
if (image.is_loaded ()) {
|
||||
image = null;
|
||||
Idle.add(() => {
|
||||
Idle.add (() => {
|
||||
loaded ();
|
||||
return false;
|
||||
});
|
||||
@ -97,4 +97,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace Gala {
|
||||
|
||||
/**
|
||||
* The unique id given to this drag-drop-group
|
||||
*/
|
||||
*/
|
||||
public string drag_id { get; construct; }
|
||||
|
||||
public Actor handle { get; private set; }
|
||||
@ -145,7 +145,7 @@ namespace Gala {
|
||||
|
||||
var source_list = sources.@get (drag_id);
|
||||
source_list.remove (actor);
|
||||
}
|
||||
}
|
||||
|
||||
if (DragDropActionType.DESTINATION in drag_type) {
|
||||
var dest_list = destinations[drag_id];
|
||||
|
@ -219,7 +219,7 @@ namespace Gala {
|
||||
var k1 = b.x - a.x;
|
||||
var k2 = b.y - a.y;
|
||||
|
||||
return k1*k1 + k2*k2;
|
||||
return k1 * k1 + k2 * k2;
|
||||
}
|
||||
|
||||
static Meta.Rectangle rect_adjusted (Meta.Rectangle rect, int dx1, int dy1, int dx2, int dy2) {
|
||||
@ -252,8 +252,10 @@ namespace Gala {
|
||||
slot_centers.resize (rows * columns);
|
||||
for (int x = 0; x < columns; x++) {
|
||||
for (int y = 0; y < rows; y++) {
|
||||
slot_centers[x + y * columns] = {area.x + slot_width * x + slot_width / 2,
|
||||
area.y + slot_height * y + slot_height / 2};
|
||||
slot_centers[x + y * columns] = {
|
||||
area.x + slot_width * x + slot_width / 2,
|
||||
area.y + slot_height * y + slot_height / 2
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +317,7 @@ namespace Gala {
|
||||
// Work out where the slot is
|
||||
Meta.Rectangle target = {area.x + (slot % columns) * slot_width,
|
||||
area.y + (slot / columns) * slot_height,
|
||||
slot_width,
|
||||
slot_width,
|
||||
slot_height};
|
||||
target = rect_adjusted (target, 10, 10, -10, -10);
|
||||
|
||||
@ -337,7 +339,7 @@ namespace Gala {
|
||||
scale = 1.0f;
|
||||
target = {rect_center (target).x - (int)Math.floorf (rect.width * scale) / 2,
|
||||
rect_center (target).y - (int)Math.floorf (rect.height * scale) / 2,
|
||||
(int)Math.floorf (scale * rect.width),
|
||||
(int)Math.floorf (scale * rect.width),
|
||||
(int)Math.floorf (scale * rect.height)};
|
||||
}
|
||||
|
||||
|
@ -218,4 +218,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace Gala {
|
||||
public TextShadowEffect (int offset_x, int offset_y, uint8 opacity) {
|
||||
_offset_x = offset_x;
|
||||
_offset_y = offset_y;
|
||||
_opacity = opacity;
|
||||
_opacity = opacity;
|
||||
}
|
||||
|
||||
public override bool pre_paint () {
|
||||
@ -54,4 +54,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,4 +155,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,4 +66,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -724,4 +724,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -382,4 +382,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,4 +184,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,9 +144,9 @@ namespace Gala {
|
||||
|
||||
foreach (var workspace in workspaces) {
|
||||
foreach (var window in workspace.list_windows ()) {
|
||||
if (window.window_type != WindowType.NORMAL &&
|
||||
window.window_type != WindowType.DOCK &&
|
||||
window.window_type != WindowType.DIALOG ||
|
||||
if (window.window_type != WindowType.NORMAL &&
|
||||
window.window_type != WindowType.DOCK &&
|
||||
window.window_type != WindowType.DIALOG ||
|
||||
window.is_attached_dialog ()) {
|
||||
var actor = window.get_compositor_private () as WindowActor;
|
||||
if (actor != null)
|
||||
|
@ -129,4 +129,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -719,7 +719,7 @@ namespace Gala {
|
||||
var next = active.get_neighbor (direction);
|
||||
|
||||
//dont allow empty workspaces to be created by moving, if we have dynamic workspaces
|
||||
if (Prefs.get_dynamic_workspaces () && Utils.get_n_windows (active) == 1 && next.index () == manager.n_workspaces - 1) {
|
||||
if (Prefs.get_dynamic_workspaces () && Utils.get_n_windows (active) == 1 && next.index () == manager.n_workspaces - 1) {
|
||||
Utils.bell (display);
|
||||
return;
|
||||
}
|
||||
@ -1043,7 +1043,7 @@ namespace Gala {
|
||||
tile_preview.get_size (out width, out height);
|
||||
|
||||
if ((tile_rect.width == width && tile_rect.height == height && tile_rect.x == x && tile_rect.y == y)
|
||||
|| tile_preview.get_transition ("size") != null) {
|
||||
|| tile_preview.get_transition ("size") != null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1163,11 +1163,10 @@ namespace Gala {
|
||||
}
|
||||
|
||||
// size_changed gets called after frame_rect has updated
|
||||
public override void size_changed (Meta.WindowActor actor)
|
||||
{
|
||||
public override void size_changed (Meta.WindowActor actor) {
|
||||
if (which_change == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Meta.SizeChange? which_change_local = which_change;
|
||||
which_change = null;
|
||||
@ -1183,7 +1182,7 @@ namespace Gala {
|
||||
var new_end = new_rect.x + new_rect.width;
|
||||
|
||||
// a tiled window is just resized (and not moved) if its start_x or its end_x stays the same
|
||||
if (old_rect_size_change.x == new_rect.x || old_end == new_end) {
|
||||
if (old_rect_size_change.x == new_rect.x || old_end == new_end) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1230,9 +1229,9 @@ namespace Gala {
|
||||
icon.width *= ui_scale;
|
||||
icon.height *= ui_scale;
|
||||
|
||||
float scale_x = (float)icon.width / actor.width;
|
||||
float scale_y = (float)icon.height / actor.height;
|
||||
float anchor_x = (float)(actor.x - icon.x) / (icon.width - actor.width);
|
||||
float scale_x = (float)icon.width / actor.width;
|
||||
float scale_y = (float)icon.height / actor.height;
|
||||
float anchor_x = (float)(actor.x - icon.x) / (icon.width - actor.width);
|
||||
float anchor_y = (float)(actor.y - icon.y) / (icon.height - actor.height);
|
||||
actor.set_pivot_point (anchor_x, anchor_y);
|
||||
|
||||
@ -1857,7 +1856,7 @@ namespace Gala {
|
||||
|
||||
var main_container = new Clutter.Actor ();
|
||||
var static_windows = new Clutter.Actor ();
|
||||
var in_group = new Clutter.Actor ();
|
||||
var in_group = new Clutter.Actor ();
|
||||
var out_group = new Clutter.Actor ();
|
||||
windows = new List<WindowActor> ();
|
||||
parents = new List<Clutter.Actor> ();
|
||||
|
@ -395,4 +395,3 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user