Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
jtaala committed May 31, 2024
2 parents 5992234 + 53ddefb commit aa8107d
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 16 deletions.
102 changes: 99 additions & 3 deletions Settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="selection_radius_size_top">
<property name="upper">50</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="selection_radius_size_bottom">
<property name="upper">50</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="animation_time_adjustment">
<property name="upper">6.00</property>
<property name="lower">0.00</property>
Expand Down Expand Up @@ -496,7 +506,7 @@
<object class="GtkLabel">
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Gaps and margins</property>
<property name="label" translatable="yes">Border | Gaps | Margins</property>
<attributes>
<attribute name="weight" value="bold" />
</attributes>
Expand Down Expand Up @@ -553,6 +563,93 @@
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<property name="focusable">False</property>
<child>
<object class="GtkGrid">
<property name="focusable">False</property>
<property name="tooltip_text" translatable="yes">The pixel size of border-radius for top corners</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel">
<property name="focusable">False</property>
<property name="hexpand">1</property>
<property name="label" translatable="yes">Selected window border-radius for top corners (px)</property>
<property name="xalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="selection_radius_top_spin">
<property name="width_chars">2</property>
<property name="max_width_chars">2</property>
<property name="adjustment">selection_radius_size_top</property>
<property name="snap_to_ticks">1</property>
<property name="numeric">1</property>
<property name="update_policy">always</property>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<property name="focusable">False</property>
<child>
<object class="GtkGrid">
<property name="focusable">False</property>
<property name="tooltip_text" translatable="yes">The pixel size of border radius for bottom corners</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel">
<property name="focusable">False</property>
<property name="hexpand">1</property>
<property name="label" translatable="yes">Selected window border-radius for bottom corners (px)</property>
<property name="xalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="selection_radius_bottom_spin">
<property name="width_chars">2</property>
<property name="max_width_chars">2</property>
<property name="adjustment">selection_radius_size_bottom</property>
<property name="snap_to_ticks">1</property>
<property name="numeric">1</property>
<property name="update_policy">always</property>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
</object>
</child>
</object>
</child>

<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
Expand Down Expand Up @@ -599,7 +696,6 @@
<object class="GtkListBoxRow" id="general_row1">
<property name="activatable">False</property>
<property name="focusable">False</property>

<child>
<object class="GtkGrid" id="workspace_grid1">
<property name="focusable">False</property>
Expand Down Expand Up @@ -1093,7 +1189,7 @@
<object class="GtkLabel">
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Animation / Visual Settings</property>
<property name="label" translatable="yes">Animation | Visual Settings</property>
<attributes>
<attribute name="weight" value="bold" />
</attributes>
Expand Down
4 changes: 0 additions & 4 deletions config/user.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ DEFAULT STYLES ARE PROVIDED BELOW FOR REFERENCE:
icon-size: 16px;
}
.paperwm-selection {
border-radius: 12px 12px 0px 0px;
}
.paperwm-minimap-selection {
border-radius: 8px;
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "https://github.com/paperwm/PaperWM",
"settings-schema": "org.gnome.shell.extensions.paperwm",
"shell-version": [ "45", "46" ],
"version-name": "46.10.1",
"version-name": "46.10.2",
"donations": {
"buymeacoffee": "jaytaala",
"patreon": "valpackett"
Expand Down
2 changes: 2 additions & 0 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ class SettingsWidget {

// General
intValueChanged('selection_size_spin', 'selection-border-size');
intValueChanged('selection_radius_top_spin', 'selection-border-radius-top');
intValueChanged('selection_radius_bottom_spin', 'selection-border-radius-bottom');
intValueChanged('window_gap_spin', 'window-gap');
intValueChanged('hmargin_spinner', 'horizontal-margin');
intValueChanged('top_margin_spinner', 'vertical-margin');
Expand Down
Binary file modified schemas/gschemas.compiled
Binary file not shown.
12 changes: 11 additions & 1 deletion schemas/org.gnome.shell.extensions.paperwm.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,17 @@

<key type="i" name="selection-border-size">
<default>10</default>
<summary>Sets the selected/focused window border size (px)</summary>
<summary>Sets the selected window border size (px)</summary>
</key>

<key type="i" name="selection-border-radius-top">
<default>12</default>
<summary>Sets the selected window border top corners radius (px)</summary>
</key>

<key type="i" name="selection-border-radius-bottom">
<default>0</default>
<summary>Sets the selected window border top corners radius (px)</summary>
</key>

<key type="d" name="minimap-scale">
Expand Down
2 changes: 2 additions & 0 deletions settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export function enable(extension) {
'overview-max-window-scale',
'minimap-shade-opacity',
'selection-border-size',
'selection-border-radius-top',
'selection-border-radius-bottom',
'open-window-position-option-right',
'open-window-position-option-left',
'open-window-position-option-start',
Expand Down
5 changes: 0 additions & 5 deletions stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ NOTE: please update `./config/users.css` with any new styles added here.
icon-size: 16px;
}

.paperwm-selection {
/* matches border radius of default gnome windows */
border-radius: 12px 12px 0px 0px;
}

.paperwm-minimap-selection {
border-radius: 8px;
}
Expand Down
11 changes: 9 additions & 2 deletions tiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,17 @@ export function enable(extension) {
gsettings.connect('changed::vertical-margin', marginsGapChanged);
gsettings.connect('changed::vertical-margin-bottom', marginsGapChanged);
gsettings.connect('changed::window-gap', marginsGapChanged);
gsettings.connect('changed::selection-border-size', () => {
const changedBorder = () => {
spaces.forEach(s => {
Settings.prefs.selection_border_size <= 0 ? s.hideSelection() : s.showSelection();
if (s.selectedWindow) {
allocateClone(s.selectedWindow);
}
});
});
};
gsettings.connect('changed::selection-border-size', changedBorder);
gsettings.connect('changed::selection-border-radius-top', changedBorder);
gsettings.connect('changed::selection-border-radius-bottom', changedBorder);

backgroundGroup = Main.layoutManager._backgroundGroup;

Expand Down Expand Up @@ -3382,6 +3385,10 @@ export function allocateClone(metaWindow) {
selection.set_size(
frame.width + (hMax ? 0 : protrusion * 2),
frame.height + (vMax ? 0 : protrusion * 2));

const rtop = Settings.prefs.selection_border_radius_top;
const rbottom = Settings.prefs.selection_border_radius_bottom;
selection.style = `border-radius: ${rtop}px ${rtop}px ${rbottom}px ${rbottom}px`;
}
}

Expand Down

0 comments on commit aa8107d

Please sign in to comment.