Skip to content

Commit

Permalink
version 11: support per-monitor layout, enable/disable edge-tiling
Browse files Browse the repository at this point in the history
  • Loading branch information
domferr committed Jul 5, 2024
1 parent 892c864 commit cce8cfc
Show file tree
Hide file tree
Showing 24 changed files with 709 additions and 320 deletions.
6 changes: 3 additions & 3 deletions resources/icons/add-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions resources/icons/cancel-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions resources/icons/delete-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions resources/icons/done-symbolic.svg

This file was deleted.

3 changes: 3 additions & 0 deletions resources/icons/edit-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions resources/icons/info-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions resources/icons/menu-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions resources/icons/save-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"45",
"46"
],
"version": 10,
"version-name": "10.0",
"version": 99,
"version-name": "11",
"url": "https://github.com/domferr/tilingshell",
"settings-schema": "org.gnome.shell.extensions.tilingshell",
"donations": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@
<summary>Overridden settings</summary>
<description>The settings that are overridden and their old value.</description>
</key>
<key name="active-screen-edges" type="b">
<default>true</default>
<summary>Active Screen Edges</summary>
<description>Drag windows against the top, left and right screen edges to resize them.</description>
</key>
<key name="top-edge-maximize" type="b">
<default>false</default>
<summary>Drag agains top edge to maximize window</summary>
<description>Drag windows against the top edge to maximize them</description>
</key>

<key type="as" name="move-window-right">
<default><![CDATA[['<Super>Right']]]></default>
Expand Down
13 changes: 3 additions & 10 deletions src/components/editor/editorDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,7 @@ export default class EditorDialog extends ModalDialog.ModalDialog {
}));

const suggestion4 = new St.BoxLayout({ vertical: false, xExpand: true, margin_top: 16 });
// RIGHT-CLICK to delete a tile
/*suggestion4.add_child(new St.Label({
text: "Use the indicator ",
xAlign: Clutter.ActorAlign.CENTER,
yAlign: Clutter.ActorAlign.CENTER,
styleClass: '',
xExpand: false
}));*/
// use indicator to save or cancel
suggestion4.add_child(new St.Icon({
iconSize: 16,
yAlign: Clutter.ActorAlign.CENTER,
Expand Down Expand Up @@ -217,7 +210,7 @@ export default class EditorDialog extends ModalDialog.ModalDialog {
xAlign: Clutter.ActorAlign.CENTER,
styleClass: "message-list-clear-button icon-button button delete-layout-button"
});
deleteBtn.child = new St.Icon({ iconName: "edit-delete-symbolic", iconSize: 16 });
deleteBtn.child = new St.Icon({ gicon: Gio.icon_new_for_string(`${params.path}/icons/delete-symbolic.svg`), iconSize: 16 });
deleteBtn.connect('clicked', (self) => {
params.onDeleteLayout(btnInd, lay);
this._drawLayouts({ ...params, layouts: GlobalState.get().layouts });
Expand All @@ -238,7 +231,7 @@ export default class EditorDialog extends ModalDialog.ModalDialog {
});
this._layoutsBoxLayout.add_child(box);
const newLayoutBtn = new LayoutButton(box, new Layout([new Tile({x: 0, y: 0, width: 1, height: 1, groups: []})], "New Layout"), gaps, this._layoutHeight, this._layoutWidth);
const icon = new St.Icon({ iconName: "list-add-symbolic", iconSize: 32 });
const icon = new St.Icon({ gicon: Gio.icon_new_for_string(`${params.path}/icons/add-symbolic.svg`), iconSize: 32 });
icon.set_size(newLayoutBtn.child.width, newLayoutBtn.child.height);
newLayoutBtn.child.add_child(icon);
newLayoutBtn.connect('clicked', (self) => {
Expand Down
7 changes: 7 additions & 0 deletions src/components/tilepreview/tilePreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export default class TilePreview extends St.Widget {
this._gaps.right = gaps.right * scalingFactor;
this._gaps.bottom = gaps.bottom * scalingFactor;
this._gaps.left = gaps.left * scalingFactor;

if (this._gaps.top === 0 && this._gaps.bottom === 0
&& this._gaps.right === 0 && this._gaps.left === 0) {
this.remove_style_class_name("custom-tile-preview");
} else {
this.add_style_class_name("custom-tile-preview");
}
}

public get gaps(): Clutter.Margin {
Expand Down
Loading

0 comments on commit cce8cfc

Please sign in to comment.