[gnome-shell/wip/jimmac/app-icon-shadows] appDisplay: Revisit "Add drop shadow to icons"
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/jimmac/app-icon-shadows] appDisplay: Revisit "Add drop shadow to icons"
- Date: Fri, 5 Feb 2021 15:01:18 +0000 (UTC)
commit 53166ad93f0071747053f3620af57f4fd3803168
Author: Jakub Steiner <jimmac gmail com>
Date: Thu Feb 4 14:16:00 2021 +0100
appDisplay: Revisit "Add drop shadow to icons"
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
data/theme/gnome-shell-sass/widgets/_base.scss | 2 +-
js/ui/appDisplay.js | 10 ++++++++--
js/ui/dash.js | 1 +
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 914dd5955e..69ebb301a7 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 69b4d0fff5..3b4e0bafcb 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 16893f9765..56e22720d8 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;
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]