From 01ea3261a377c89f63445db97969f0b903dbbf82 Mon Sep 17 00:00:00 2001
From: fcusr <2025690488@qq.com>
Date: Mon, 20 Mar 2023 22:29:02 +0800
Subject: [PATCH] Support GNOME 44
---
.../extension.js | 43 ++++---------------
.../metadata.json | 4 +-
.../stylesheet.css | 3 +-
.../themes/Adwaita/theme-data.json | 2 +-
.../themes/Adwaita/weather-clear-night.svg | 2 +-
.../Adwaita/weather-few-clouds-night.svg | 2 +-
.../themes/Adwaita/weather-severe-alert.svg | 2 +-
.../themes/Adwaita/weather-showers.svg | 2 +-
.../themes/Adwaita/weather-storm.svg | 2 +-
.../themes/Adwaita/weather.svg | 2 +-
.../themes/Yaru/theme-data.json | 2 +-
.../themes/Yaru/weather-clear-night.svg | 2 +-
.../themes/Yaru/weather-few-clouds-night.svg | 2 +-
.../themes/Yaru/weather-none.svg | 2 +-
.../themes/Yaru/weather-severe-alert.svg | 2 +-
.../themes/Yaru/weather-showers.svg | 2 +-
.../themes/Yaru/weather-storm.svg | 2 +-
.../themes/Yaru/weather.svg | 2 +-
18 files changed, 27 insertions(+), 53 deletions(-)
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/extension.js b/dynamic-calendar-and-clocks-icons@fcusr.github.com/extension.js
index c5a1c51..7e7a55c 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/extension.js
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/extension.js
@@ -444,7 +444,8 @@ function repaintWeather(icon) {
'color: rgb(' + tempR + ',' + tempG + ',' + tempB + ');' +
'font-family: ' + temperatureFont + ', sans-serif;' +
'font-weight: ' + tempBold + ';' +
- 'font-size: ' + iconSize / 96 * temperatureSize + 'px;';
+ 'font-size: ' + iconSize / 96 * temperatureSize + 'px;' +
+ 'text-shadow: 0 0 transparent;';
icon.label.visible = showTemperature;
}
@@ -518,41 +519,13 @@ function getIconSize(icon, context) {
}
function redisplayIcons() {
- let controls = Main.overview._overview._controls;
- let appDisplay = controls._appDisplay;
- let apps = appDisplay._orderedItems.slice();
- apps.forEach(icon => {
- if(icon._id == CALENDAR_FILE || icon._id == CLOCKS_FILE
- || icon._id == WEATHER_FILE) {
- icon.icon.update();
- }
- });
- let folderIcons = appDisplay._folderIcons;
- folderIcons.forEach(folderIcon => {
- let appsInFolder = folderIcon.view._orderedItems.slice();
- appsInFolder.forEach(icon => {
- if(icon._id == CALENDAR_FILE || icon._id == CLOCKS_FILE
- || icon._id == WEATHER_FILE) {
- icon.icon.update();
- }
- });
- folderIcon.icon.update();
- });
- let dash = controls.dash;
- let children = dash._box.get_children().filter(actor => {
- return actor.child
- && actor.child._delegate && actor.child._delegate.app;
- });
- children.forEach(actor => {
- let actorId = actor.child._delegate.app.get_id();
- if(actorId == CALENDAR_FILE || actorId == CLOCKS_FILE
- || actorId == WEATHER_FILE) {
- actor.child.icon.update();
- }
+ let textureCache = St.TextureCache.get_default();
+ textureCache.disconnect(textureHandler);
+ textureCache.emit('icon-theme-changed');
+ textureHandler = textureCache.connect('icon-theme-changed', () => {
+ loadTheme();
+ weatherClient.emit('changed');
});
- let searchResults = controls._searchController._searchResults;
- searchResults._reloadRemoteProviders();
- Main.panel.statusArea['appMenu']._onIconThemeChanged();
}
function destroyObjects() {
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/metadata.json b/dynamic-calendar-and-clocks-icons@fcusr.github.com/metadata.json
index 16df4f4..5e4129f 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/metadata.json
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/metadata.json
@@ -3,7 +3,7 @@
"name": "Dynamic Calendar, Clocks and Weather Icons",
"description":
"Let Calendar, Clocks and Weather icons show current date, time and weather.",
- "version": 6,
- "shell-version": ["43"],
+ "version": 7,
+ "shell-version": ["43", "44"],
"url": "https://github.com/fcusr/dynamic-calendar-and-clocks-icons"
}
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/stylesheet.css b/dynamic-calendar-and-clocks-icons@fcusr.github.com/stylesheet.css
index c70c726..0d8816e 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/stylesheet.css
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/stylesheet.css
@@ -1,5 +1,6 @@
.message .message-icon-bin > StDrawingArea,
-.message .message-icon-bin > StBin {
+.message .message-icon-bin > StBin,
+.message .message-icon-bin > StBin StIcon {
width: 32px;
height: 32px;
-st-icon-style: symbolic;
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/theme-data.json b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/theme-data.json
index 5316367..eb25d15 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/theme-data.json
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/theme-data.json
@@ -4,7 +4,7 @@
"dayMonthBold": true,
"dayMonthSize": 14,
"dayMonthPos": 25,
- "dayMonthMaxWidth": 78,
+ "dayMonthMaxWidth": 74,
"dateColor": [237, 51, 59],
"dateFont": "Cantarell",
"dateBold": true,
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-clear-night.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-clear-night.svg
index 015e790..31730d0 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-clear-night.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-clear-night.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-few-clouds-night.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-few-clouds-night.svg
index 200ad45..81a02c6 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-few-clouds-night.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-few-clouds-night.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-severe-alert.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-severe-alert.svg
index 5d8d60e..4187a76 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-severe-alert.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-severe-alert.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-showers.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-showers.svg
index 5df36b4..4babf96 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-showers.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-showers.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-storm.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-storm.svg
index 0ea4954..fdb8171 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-storm.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather-storm.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather.svg
index c9393c3..5a4d231 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Adwaita/weather.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/theme-data.json b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/theme-data.json
index 441917b..53ad7a9 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/theme-data.json
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/theme-data.json
@@ -4,7 +4,7 @@
"dayMonthBold": true,
"dayMonthSize": 14,
"dayMonthPos": 25,
- "dayMonthMaxWidth": 84,
+ "dayMonthMaxWidth": 80,
"dateColor": [249, 249, 249],
"dateFont": "Cantarell",
"dateBold": false,
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-clear-night.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-clear-night.svg
index 015e790..31730d0 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-clear-night.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-clear-night.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-few-clouds-night.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-few-clouds-night.svg
index 200ad45..81a02c6 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-few-clouds-night.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-few-clouds-night.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-none.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-none.svg
index 13d9fe5..8b444e2 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-none.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-none.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-severe-alert.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-severe-alert.svg
index 5d8d60e..4187a76 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-severe-alert.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-severe-alert.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-showers.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-showers.svg
index 5df36b4..4babf96 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-showers.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-showers.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-storm.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-storm.svg
index 0ea4954..fdb8171 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-storm.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather-storm.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather.svg b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather.svg
index e07cc6f..80fab76 100644
--- a/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather.svg
+++ b/dynamic-calendar-and-clocks-icons@fcusr.github.com/themes/Yaru/weather.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file