Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/extension/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,15 @@ export class WindowManager extends GObject.Object {

if (floatingExempt) {
this.removeFloatOverride(metaWindow, withWmId);
this.windowProps = this.ext.configMgr.windowProps;
if (!this.isActiveWindowWorkspaceTiled(metaWindow)) {
nodeWindow.mode = WINDOW_MODES.FLOAT;
} else {
nodeWindow.mode = WINDOW_MODES.TILE;
}
} else {
this.addFloatOverride(metaWindow, withWmId);
this.windowProps = this.ext.configMgr.windowProps;
nodeWindow.mode = WINDOW_MODES.FLOAT;
}
}
Expand Down
45 changes: 45 additions & 0 deletions lib/prefs/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,50 @@ export class AppearancePage extends PreferencesPage {
}),
],
});
const borderRadiusSelectors = [
".window-tiled-border",
".window-split-border",
".window-stacked-border",
".window-tabbed-border",
".window-floated-border",
".window-tilepreview-tiled",
".window-tilepreview-stacked",
".window-tilepreview-swap",
".window-tilepreview-tabbed",
];

const currentRadius = parseInt(
this.themeMgr.removePx(
this.themeMgr.getCssProperty(".window-tiled-border", "border-radius").value ?? "14px"
)
);

const borderRadiusRow = new SpinButtonRow({
title: _("Border radius"),
subtitle: _("Set to 0 for square corners"),
range: [0, 28, 1],
init: currentRadius,
onChange: (value) => {
const px = this.themeMgr.addPx(value);
for (const selector of borderRadiusSelectors) {
this.themeMgr.setCssProperty(selector, "border-radius", px);
}
},
});

borderRadiusRow.add_suffix(
new ResetButton({
onReset: () => {
const defaultRadius = 14;
const px = this.themeMgr.addPx(defaultRadius);
for (const selector of borderRadiusSelectors) {
this.themeMgr.setCssProperty(selector, "border-radius", px);
}
borderRadiusRow.activatable_widget.value = defaultRadius;
},
})
);

this.add_group({
title: _("Style"),
description: _("Change how the shell looks"),
Expand Down Expand Up @@ -97,6 +141,7 @@ export class AppearancePage extends PreferencesPage {
settings,
bind: "quick-settings-enabled",
}),
borderRadiusRow,
],
});
this.add_group({
Expand Down
Loading