workspace: Remove some additional features used for GridLayoutStrategy
While we won't tear down the entire strategy infrastructure, we want to rework some layout code in the future, so just tear this piece out for now. https://bugzilla.gnome.org/show_bug.cgi?id=694902
This commit is contained in:
parent
804ff8b5a5
commit
d58b715c52
@ -583,13 +583,9 @@ const LayoutStrategy = new Lang.Class({
|
|||||||
// meant to be scaled
|
// meant to be scaled
|
||||||
//
|
//
|
||||||
// * neither height/fullHeight have any sort of spacing or padding
|
// * neither height/fullHeight have any sort of spacing or padding
|
||||||
//
|
|
||||||
// * if cellWidth is present, all windows in the row will occupy
|
|
||||||
// the space of cellWidth, centered.
|
|
||||||
return { x: 0, y: 0,
|
return { x: 0, y: 0,
|
||||||
width: 0, height: 0,
|
width: 0, height: 0,
|
||||||
fullWidth: 0, fullHeight: 0,
|
fullWidth: 0, fullHeight: 0,
|
||||||
cellWidth: 0,
|
|
||||||
windows: [] };
|
windows: [] };
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -614,8 +610,8 @@ const LayoutStrategy = new Lang.Class({
|
|||||||
|
|
||||||
// Compute the size of each row, by assigning to the properties
|
// Compute the size of each row, by assigning to the properties
|
||||||
// row.width, row.height, row.fullWidth, row.fullHeight, and
|
// row.width, row.height, row.fullWidth, row.fullHeight, and
|
||||||
// (optionally) row.cellWidth, for each row in @layout.rows.
|
// (optionally) for each row in @layout.rows. This method is
|
||||||
// This method is intended to be called by subclasses.
|
// intended to be called by subclasses.
|
||||||
_computeRowSizes: function(layout) {
|
_computeRowSizes: function(layout) {
|
||||||
throw new Error('_computeRowSizes not implemented');
|
throw new Error('_computeRowSizes not implemented');
|
||||||
},
|
},
|
||||||
@ -697,7 +693,7 @@ const LayoutStrategy = new Lang.Class({
|
|||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
let row = rows[i];
|
let row = rows[i];
|
||||||
row.y += baseY;
|
row.y += baseY;
|
||||||
let baseX = row.x;
|
let x = row.x;
|
||||||
for (let j = 0; j < row.windows.length; j++) {
|
for (let j = 0; j < row.windows.length; j++) {
|
||||||
let window = row.windows[j];
|
let window = row.windows[j];
|
||||||
|
|
||||||
@ -707,14 +703,8 @@ const LayoutStrategy = new Lang.Class({
|
|||||||
let height = window.actor.height * s;
|
let height = window.actor.height * s;
|
||||||
let y = row.y + row.height - height;
|
let y = row.y + row.height - height;
|
||||||
|
|
||||||
let x = baseX;
|
|
||||||
if (row.cellWidth) {
|
|
||||||
x += (row.cellWidth - width) / 2;
|
|
||||||
width = row.cellWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
slots.push([x, y, s, window]);
|
slots.push([x, y, s, window]);
|
||||||
baseX += width + this._columnSpacing;
|
x += width + this._columnSpacing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return slots;
|
return slots;
|
||||||
|
Loading…
Reference in New Issue
Block a user