summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Steiner <jimmac@gmail.com>2021-02-04 14:16:00 +0100
committerJakub Steiner <jimmac@gmail.com>2021-02-05 15:59:09 +0100
commit53166ad93f0071747053f3620af57f4fd3803168 (patch)
tree4f0f346ff4cf363ddfaa17f24cd03249a00399e0
parent97b9cdc720d2b7699c708594cfda7ef8c0531ac6 (diff)
downloadgnome-shell-wip/jimmac/app-icon-shadows.tar.gz
appDisplay: Revisit "Add drop shadow to icons"wip/jimmac/app-icon-shadows
The shadow is barely visible on dark backgrounds, but it's not wrong to be consistent with Settings, Software and GNOME Classic. With the app icon swarm animation gon, the performance implications might not be as critical (https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3124 - increase blur but not much, while we can't have multi-layered shadows. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3670 Also see https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3123
-rw-r--r--data/theme/gnome-shell-sass/widgets/_base.scss2
-rw-r--r--js/ui/appDisplay.js10
-rw-r--r--js/ui/dash.js1
3 files changed, 10 insertions, 3 deletions
diff --git a/data/theme/gnome-shell-sass/widgets/_base.scss b/data/theme/gnome-shell-sass/widgets/_base.scss
index 914dd5955..69ebb301a 100644
--- a/data/theme/gnome-shell-sass/widgets/_base.scss
+++ b/data/theme/gnome-shell-sass/widgets/_base.scss
@@ -14,5 +14,5 @@
// Dropshadow for large icons
.icon-dropshadow {
- icon-shadow: 0 1px 2px rgba(black, 0.4);
+ icon-shadow: 0 1px 5px rgba(black, 0.8);
}
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 69b4d0fff..3b4e0bafc 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1424,7 +1424,11 @@ var AppSearchProvider = class AppSearchProvider {
metas.push({
id: app.get_id(),
name: app.get_name(),
- createIcon: size => app.create_icon_texture(size),
+ createIcon: size => {
+ const icon = app.create_icon_texture(size);
+ icon.add_style_class_name('icon-dropshadow');
+ return icon;
+ },
});
} else {
let name = this._systemActions.getName(id);
@@ -2688,7 +2692,9 @@ var AppIcon = GObject.registerClass({
}
_createIcon(iconSize) {
- return this.app.create_icon_texture(iconSize);
+ const icon = this.app.create_icon_texture(iconSize);
+ icon.add_style_class_name('icon-dropshadow');
+ return icon;
}
_removeMenuTimeout() {
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 16893f976..56e22720d 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -468,6 +468,7 @@ var Dash = GObject.registerClass({
item.setLabelText(app.get_name());
appIcon.icon.setIconSize(this.iconSize);
+ appIcon.icon.add_style_class_name('icon-dropshadow');
this._hookUpLabel(item, appIcon);
return item;