Skip to content

Commit

Permalink
Merge pull request #533 from a-parhom/dash_to_dock_rounded_blur
Browse files Browse the repository at this point in the history
Static blur and rounding effect for dash-to-dock
  • Loading branch information
aunetx committed Mar 5, 2024
2 parents c4d6790 + 4f543f1 commit d72db05
Show file tree
Hide file tree
Showing 11 changed files with 768 additions and 140 deletions.
2 changes: 1 addition & 1 deletion resources/ui/applications.ui
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To get the best results possible, make sure to choose the option “No artifact
<object class="AdwActionRow">
<property name="title" translatable="yes">Opacity</property>
<property name="subtitle" translatable="yes">The opacity of the window on top of the blur effect, a higher value will be more legible.</property>
<property name="activatable-widget">opacity</property>
<property name="activatable-widget">opacity_scale</property>
<property name="sensitive" bind-source="blur" bind-property="state" bind-flags="sync-create" />

<child>
Expand Down
45 changes: 45 additions & 0 deletions resources/ui/dash.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,46 @@

<child>
<object class="CustomizeRow" id="customize">
<property name="sensitive" bind-source="blur" bind-property="state"
bind-flags="sync-create" />
</object>
</child>

<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Static blur</property>
<property name="subtitle" translatable="yes">Uses a static blurred image, can be used with rounding effect.</property>
<property name="activatable-widget">static_blur</property>
<property name="sensitive" bind-source="blur" bind-property="state" bind-flags="sync-create" />

<child>
<object class="GtkSwitch" id="static_blur">
<property name="valign">center</property>
</object>
</child>
</object>
</child>

<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Rounded corner radius</property>
<property name="subtitle" translatable="yes">The radius for the rounding effect. Only available with static blur.</property>
<property name="activatable-widget">corner_radius_scale</property>
<property name="sensitive" bind-source="blur" bind-property="state" bind-flags="sync-create" />
<property name="sensitive" bind-source="static_blur" bind-property="state" bind-flags="sync-create" />

<child>
<object class="GtkScale" id="corner_radius_scale">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">200px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">0</property>
<property name="adjustment">corner_radius</property>
</object>
</child>
</object>
</child>

Expand Down Expand Up @@ -70,4 +109,10 @@
<item translatable="yes">Dark</item>
</items>
</object>

<object class="GtkAdjustment" id="corner_radius">
<property name="lower">0</property>
<property name="upper">50</property>
<property name="step-increment">1</property>
</object>
</interface>
30 changes: 15 additions & 15 deletions resources/ui/panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@
</object>
</child>

<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Disable in overview</property>
<property name="subtitle" translatable="yes">Disables the blur from the panel when entering the overview.</property>
<property name="activatable-widget">unblur_in_overview</property>
<property name="sensitive" bind-source="blur" bind-property="state" bind-flags="sync-create" />

<child>
<object class="GtkSwitch" id="unblur_in_overview">
<property name="valign">center</property>
</object>
</child>
</object>
</child>

<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Force light text</property>
Expand Down Expand Up @@ -104,6 +89,21 @@ Recommended unless you want to customize your GNOME theme.</property>
</child>
</object>
</child>

<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Disable in overview</property>
<property name="subtitle" translatable="yes">Disables the blur from the panel when entering the overview.</property>
<property name="activatable-widget">unblur_in_overview</property>
<property name="sensitive" bind-source="blur" bind-property="state" bind-flags="sync-create" />

<child>
<object class="GtkSwitch" id="unblur_in_overview">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>

Expand Down
56 changes: 36 additions & 20 deletions schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<!-- GENERAL -->
<schema id="org.gnome.shell.extensions.blur-my-shell" path="/org/gnome/shell/extensions/blur-my-shell/">
<schema id="org.gnome.shell.extensions.blur-my-shell"
path="/org/gnome/shell/extensions/blur-my-shell/">
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Global sigma (gaussian blur radius) to use</summary>
<summary>Global gaussian sigma to use</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand Down Expand Up @@ -56,7 +57,8 @@
</schema>

<!-- OVERVIEW -->
<schema id="org.gnome.shell.extensions.blur-my-shell.overview" path="/org/gnome/shell/extensions/blur-my-shell/overview/">
<schema id="org.gnome.shell.extensions.blur-my-shell.overview"
path="/org/gnome/shell/extensions/blur-my-shell/overview/">
<!-- BLUR -->
<key type="b" name="blur">
<default>true</default>
Expand All @@ -70,7 +72,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand Down Expand Up @@ -100,7 +102,8 @@
</schema>

<!-- APPFOLDER -->
<schema id="org.gnome.shell.extensions.blur-my-shell.appfolder" path="/org/gnome/shell/extensions/blur-my-shell/appfolder/">
<schema id="org.gnome.shell.extensions.blur-my-shell.appfolder"
path="/org/gnome/shell/extensions/blur-my-shell/appfolder/">
<!-- BLUR -->
<key type="b" name="blur">
<default>true</default>
Expand All @@ -114,7 +117,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand Down Expand Up @@ -144,7 +147,8 @@
</schema>

<!-- PANEL -->
<schema id="org.gnome.shell.extensions.blur-my-shell.panel" path="/org/gnome/shell/extensions/blur-my-shell/panel/">
<schema id="org.gnome.shell.extensions.blur-my-shell.panel"
path="/org/gnome/shell/extensions/blur-my-shell/panel/">
<!-- BLUR -->
<key type="b" name="blur">
<default>true</default>
Expand All @@ -158,7 +162,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand Down Expand Up @@ -213,7 +217,8 @@
</schema>

<!-- DASH TO DOCK -->
<schema id="org.gnome.shell.extensions.blur-my-shell.dash-to-dock" path="/org/gnome/shell/extensions/blur-my-shell/dash-to-dock/">
<schema id="org.gnome.shell.extensions.blur-my-shell.dash-to-dock"
path="/org/gnome/shell/extensions/blur-my-shell/dash-to-dock/">
<!-- BLUR -->
<key type="b" name="blur">
<default>false</default>
Expand All @@ -227,7 +232,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand Down Expand Up @@ -269,10 +274,16 @@
<default>false</default>
<summary>Boolean, whether to disable blur from this component when opening the overview or not</summary>
</key>
<!-- CORNER RADIUS -->
<key type="i" name="corner-radius">
<default>12</default>
<summary>Radius for the corner rounding effect</summary>
</key>
</schema>

<!-- APPLICATIONS -->
<schema id="org.gnome.shell.extensions.blur-my-shell.applications" path="/org/gnome/shell/extensions/blur-my-shell/applications/">
<schema id="org.gnome.shell.extensions.blur-my-shell.applications"
path="/org/gnome/shell/extensions/blur-my-shell/applications/">
<!-- BLUR -->
<key type="b" name="blur">
<default>false</default>
Expand All @@ -286,7 +297,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand Down Expand Up @@ -336,7 +347,8 @@
</schema>

<!-- SCREENSHOT -->
<schema id="org.gnome.shell.extensions.blur-my-shell.screenshot" path="/org/gnome/shell/extensions/blur-my-shell/screenshot/">
<schema id="org.gnome.shell.extensions.blur-my-shell.screenshot"
path="/org/gnome/shell/extensions/blur-my-shell/screenshot/">
<!-- BLUR -->
<key type="b" name="blur">
<default>true</default>
Expand All @@ -350,7 +362,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand All @@ -375,7 +387,8 @@
</schema>

<!-- LOCKSCREEN -->
<schema id="org.gnome.shell.extensions.blur-my-shell.lockscreen" path="/org/gnome/shell/extensions/blur-my-shell/lockscreen/">
<schema id="org.gnome.shell.extensions.blur-my-shell.lockscreen"
path="/org/gnome/shell/extensions/blur-my-shell/lockscreen/">
<!-- BLUR -->
<key type="b" name="blur">
<default>true</default>
Expand All @@ -389,7 +402,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand All @@ -414,7 +427,8 @@
</schema>

<!-- WINDOW LIST -->
<schema id="org.gnome.shell.extensions.blur-my-shell.window-list" path="/org/gnome/shell/extensions/blur-my-shell/window-list/">
<schema id="org.gnome.shell.extensions.blur-my-shell.window-list"
path="/org/gnome/shell/extensions/blur-my-shell/window-list/">
<!-- BLUR -->
<key type="b" name="blur">
<default>true</default>
Expand All @@ -428,7 +442,7 @@
<!-- SIGMA -->
<key type="i" name="sigma">
<default>30</default>
<summary>Sigma (gaussian blur radius) to use for the blur effect</summary>
<summary>Gaussian sigma to use for the blur effect</summary>
</key>
<!-- BRIGHTNESS -->
<key type="d" name="brightness">
Expand All @@ -453,7 +467,8 @@
</schema>

<!-- HIDETOPBAR -->
<schema id="org.gnome.shell.extensions.blur-my-shell.hidetopbar" path="/org/gnome/shell/extensions/blur-my-shell/hidetopbar/">
<schema id="org.gnome.shell.extensions.blur-my-shell.hidetopbar"
path="/org/gnome/shell/extensions/blur-my-shell/hidetopbar/">
<!-- COMPATIBILITY -->
<key type="b" name="compatibility">
<default>false</default>
Expand All @@ -462,7 +477,8 @@
</schema>

<!-- DASH TO PANEL -->
<schema id="org.gnome.shell.extensions.blur-my-shell.dash-to-panel" path="/org/gnome/shell/extensions/blur-my-shell/dash-to-panel/">
<schema id="org.gnome.shell.extensions.blur-my-shell.dash-to-panel"
path="/org/gnome/shell/extensions/blur-my-shell/dash-to-panel/">
<!-- COMPATIBILITY -->
<key type="b" name="blur-original-panel">
<default>true</default>
Expand Down
Loading

0 comments on commit d72db05

Please sign in to comment.