Compare commits

...

No commits in common. "c9-beta" and "a10s" have entirely different histories.

11 changed files with 167 additions and 288 deletions

49
.gitignore vendored
View File

@ -1 +1,48 @@
SOURCES/background-logo-extension-40.rc.tar.xz
/background-logo-extension-3.14.0.tar.xz
/background-logo-extension-3.15.1.tar.xz
/background-logo-extension-3.15.2.tar.xz
/background-logo-extension-3.15.3.tar.xz
/background-logo-extension-3.15.90.tar.xz
/background-logo-extension-3.15.91.tar.xz
/background-logo-extension-3.15.92.tar.xz
/background-logo-extension-3.16.0.tar.xz
/background-logo-extension-3.16.1.tar.xz
/background-logo-extension-3.17.1.tar.xz
/background-logo-extension-3.17.2.tar.xz
/background-logo-extension-3.17.3.tar.xz
/background-logo-extension-3.17.90.tar.xz
/background-logo-extension-3.17.91.tar.xz
/background-logo-extension-3.17.92.tar.xz
/background-logo-extension-3.18.0.tar.xz
/background-logo-extension-3.19.1.tar.xz
/background-logo-extension-3.19.2.tar.xz
/background-logo-extension-3.19.3.tar.xz
/background-logo-extension-3.19.4.tar.xz
/background-logo-extension-3.19.90.tar.xz
/background-logo-extension-3.19.91.tar.xz
/background-logo-extension-3.19.92.tar.xz
/background-logo-extension-3.20.0.tar.xz
/background-logo-extension-3.21.2.tar.xz
/background-logo-extension-3.21.3.tar.xz
/background-logo-extension-3.21.91.tar.xz
/background-logo-extension-3.21.92.tar.xz
/background-logo-extension-3.22.0.tar.xz
/background-logo-extension-3.24.0.tar.xz
/background-logo-extension-3.32.0.tar.xz
/background-logo-extension-3.34.0.tar.xz
/background-logo-extension-3.36.0.tar.xz
/background-logo-extension-3.37.3.tar.xz
/background-logo-extension-3.37.3-3-g574ed73.tar.xz
/background-logo-extension-40.beta.tar.xz
/background-logo-extension-40.rc.tar.xz
/background-logo-extension-41.0.tar.xz
/background-logo-extension-42.beta.tar.xz
/background-logo-extension-42.0.tar.xz
/background-logo-extension-43.0.tar.xz
/background-logo-extension-44.beta.tar.xz
/background-logo-extension-44.0.tar.xz
/background-logo-extension-45.beta.tar.xz
/background-logo-extension-46.beta.tar.xz
/background-logo-extension-46.0.tar.xz
/background-logo-extension-47.alpha.tar.xz
/background-logo-extension-47.0.tar.xz

View File

@ -1 +0,0 @@
9fd1c98a8e561a7f316619d251e23cfbd6229668 SOURCES/background-logo-extension-40.rc.tar.xz

View File

@ -0,0 +1,47 @@
From b1de707062a2478f9a980683db8a8fbf55881f8d Mon Sep 17 00:00:00 2001
From: Andrew Lukoshko <alukoshko@almalinux.org>
Date: Thu, 10 Oct 2024 20:50:04 +0000
Subject: [PATCH] Adjust default values for AlmaLinux
---
...org.fedorahosted.background-logo-extension.gschema.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/schemas/org.fedorahosted.background-logo-extension.gschema.xml b/schemas/org.fedorahosted.background-logo-extension.gschema.xml
index 14f6793..5e23b3a 100644
--- a/schemas/org.fedorahosted.background-logo-extension.gschema.xml
+++ b/schemas/org.fedorahosted.background-logo-extension.gschema.xml
@@ -13,18 +13,18 @@
<schema path="/org/fedorahosted/background-logo-extension/"
id="org.fedorahosted.background-logo-extension">
<key type="s" name="logo-file">
- <default>'/usr/share/fedora-logos/fedora_lightbackground.svg'</default>
+ <default>'/usr/share/almalinux-logos/fedora_logo_darkbackground.svg'</default>
<summary>Logo file</summary>
<description>The full logo file path</description>
</key>
<key type="s" name="logo-file-dark">
- <default>'/usr/share/fedora-logos/fedora_darkbackground.svg'</default>
+ <default>'/usr/share/almalinux-logos/fedora_logo_darkbackground.svg'</default>
<summary>Logo file in dark mode</summary>
<description>The full logo file path for dark mode</description>
</key>
<key name="logo-position"
enum="org.fedorahosted.background-logo-extension.Position">
- <default>'bottom-right'</default>
+ <default>'bottom-left'</default>
<summary>Logo position</summary>
<description>
The position logo of the logo; valid values are 'center',
@@ -34,7 +34,7 @@
</key>
<key type="d" name="logo-size">
<range min="5.0" max="15.0"/>
- <default>9.0</default>
+ <default>9.0</default>
<summary>Logo size</summary>
<description>The logo size in percent relative to the screen width</description>
</key>
--
2.43.5

View File

@ -1,34 +0,0 @@
From ca8d41f48b41f181e86804b940b2737b4255e4ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Mon, 28 Feb 2022 13:49:34 +0100
Subject: [PATCH] Adjust default values for RHEL
---
.../org.fedorahosted.background-logo-extension.gschema.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/schemas/org.fedorahosted.background-logo-extension.gschema.xml b/schemas/org.fedorahosted.background-logo-extension.gschema.xml
index 74bc3a8..f7e8f07 100644
--- a/schemas/org.fedorahosted.background-logo-extension.gschema.xml
+++ b/schemas/org.fedorahosted.background-logo-extension.gschema.xml
@@ -13,7 +13,7 @@
<schema path="/org/fedorahosted/background-logo-extension/"
id="org.fedorahosted.background-logo-extension">
<key type="s" name="logo-file">
- <default>'/usr/share/fedora-logos/fedora_lightbackground.svg'</default>
+ <default>'/usr/share/redhat-logos/fedora_logo_darkbackground.svg'</default>
<summary>Logo file</summary>
<description>The full logo file path</description>
</key>
@@ -29,7 +29,7 @@
</key>
<key type="d" name="logo-size">
<range min="5.0" max="15.0"/>
- <default>9.0</default>
+ <default>15.0</default>
<summary>Logo size</summary>
<description>The logo size in percent relative to the screen width</description>
</key>
--
2.35.1

View File

@ -1,135 +0,0 @@
From ff01583cb7eb00cbe012011b3de34298243787bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 8 Feb 2022 13:41:18 +0100
Subject: [PATCH] Support positioning at the top
Fedora has always placed the logo at the bottom, but for RHEL the
placement will likely be at the top.
---
extension.js | 30 ++++++++-----------
prefs.js | 30 +++++++++----------
...sted.background-logo-extension.gschema.xml | 6 +++-
3 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/extension.js b/extension.js
index d1bf35b..8255617 100644
--- a/extension.js
+++ b/extension.js
@@ -166,26 +166,22 @@ class BackgroundLogo extends St.Widget {
_updatePosition() {
let xAlign, yAlign;
- switch (this._settings.get_string('logo-position')) {
- case 'center':
- xAlign = Clutter.ActorAlign.CENTER;
- yAlign = Clutter.ActorAlign.CENTER;
- break;
- case 'bottom-left':
+ const position = this._settings.get_string('logo-position');
+ if (position.endsWith('left'))
xAlign = Clutter.ActorAlign.START;
- yAlign = Clutter.ActorAlign.END;
- break;
- case 'bottom-center':
- xAlign = Clutter.ActorAlign.CENTER;
- yAlign = Clutter.ActorAlign.END;
- break;
- case 'bottom-right':
+ else if (position.endsWith('right'))
xAlign = Clutter.ActorAlign.END;
+ else
+ xAlign = Clutter.ActorAlign.CENTER;
+
+ if (position.startsWith('top'))
+ yAlign = Clutter.ActorAlign.START;
+ else if (position.startsWith('bottom'))
yAlign = Clutter.ActorAlign.END;
- break;
- }
- this._bin.x_align = xAlign;
- this._bin.y_align = yAlign;
+ else
+ yAlign = Clutter.ActorAlign.CENTER;
+
+ this._bin.set({ xAlign, yAlign });
}
_updateBorder() {
diff --git a/prefs.js b/prefs.js
index a2ce27a..c8d5903 100644
--- a/prefs.js
+++ b/prefs.js
@@ -76,6 +76,9 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid {
comboBox.append('bottom-left', 'Bottom left');
comboBox.append('bottom-center', 'Bottom center');
comboBox.append('bottom-right', 'Bottom right');
+ comboBox.append('top-left', 'Top left');
+ comboBox.append('top-center', 'Top center');
+ comboBox.append('top-right', 'Top right');
this._settings.bind('logo-position',
comboBox, 'active-id',
Gio.SettingsBindFlags.DEFAULT);
@@ -196,24 +199,21 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid {
_getLogoPosition(width, height) {
let scaledBorder = this._settings.get_uint('logo-border');
let x, y;
- switch (this._settings.get_string('logo-position')) {
- case 'center':
- x = (width - this._logo.get_width()) / 2;
- y = (height - this._logo.get_height()) / 2;
- break;
- case 'bottom-left':
+ const position = this._settings.get_string('logo-position');
+ if (position.endsWith('left'))
x = scaledBorder;
- y = height - this._logo.get_height() - scaledBorder;
- break;
- case 'bottom-center':
+ else if (position.endsWith('right'))
+ x = (width - this._logo.get_width() - scaledBorder);
+ else
x = (width - this._logo.get_width()) / 2;
+
+ if (position.startsWith('top'))
+ y = scaledBorder;
+ else if (position.startsWith('bottom'))
y = height - this._logo.get_height() - scaledBorder;
- break;
- case 'bottom-right':
- x = width - this._logo.get_width() - scaledBorder;
- y = height - this._logo.get_height() - scaledBorder;
- break;
- }
+ else
+ y = (height - this._logo.get_height()) / 2;
+
return [x, y];
}
diff --git a/schemas/org.fedorahosted.background-logo-extension.gschema.xml b/schemas/org.fedorahosted.background-logo-extension.gschema.xml
index abacefb..74bc3a8 100644
--- a/schemas/org.fedorahosted.background-logo-extension.gschema.xml
+++ b/schemas/org.fedorahosted.background-logo-extension.gschema.xml
@@ -5,6 +5,9 @@
<value nick="bottom-left" value="1"/>
<value nick="bottom-center" value="2"/>
<value nick="bottom-right" value="3" />
+ <value nick="top-left" value="4"/>
+ <value nick="top-center" value="5"/>
+ <value nick="top-right" value="6" />
</enum>
<schema path="/org/fedorahosted/background-logo-extension/"
@@ -20,7 +23,8 @@
<summary>Logo position</summary>
<description>
The position logo of the logo; valid values are 'center',
- 'bottom-left', 'bottom-center' and 'bottom-right'
+ 'bottom-left', 'bottom-center', 'bottom-right',
+ 'top-left', 'top-center' and 'top-right'
</description>
</key>
<key type="d" name="logo-size">
--
2.33.1

View File

@ -1,40 +0,0 @@
From ab86a3469bca9246ba5a6039d0cce8c6afae1fc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 15 Feb 2022 15:25:43 +0100
Subject: [PATCH] prefs: Scale preview border
We currently pick up the settings value directly, which is the
border that is used on the actual (i.e. monitor-sized) background.
That's way too big when applied as-is on the preview, so assume a
common monitor size and compute an appropriate scale from that.
---
prefs.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/prefs.js b/prefs.js
index c8d5903..ba78322 100644
--- a/prefs.js
+++ b/prefs.js
@@ -13,6 +13,7 @@ const ExtensionUtils = imports.misc.extensionUtils;
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
+const MONITOR_WIDTH = 1920;
const PREVIEW_WIDTH = 400;
let BackgroundLogoPrefsWidget = GObject.registerClass(
@@ -197,7 +198,9 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid {
}
_getLogoPosition(width, height) {
- let scaledBorder = this._settings.get_uint('logo-border');
+ const previewScale = PREVIEW_WIDTH / MONITOR_WIDTH;
+ const scaledBorder =
+ previewScale * this._settings.get_uint('logo-border');
let x, y;
const position = this._settings.get_string('logo-position');
if (position.endsWith('left'))
--
2.33.1

View File

@ -1,33 +0,0 @@
From 423119599c7a98dc51dda6e5260c992e21438d60 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mar 31 2021 16:40:10 +0000
Subject: extension: Do not relayout on scale changes
This makes the background logo position flicker as we enter the
overview. This actor is part of the BackgroundActor actor hierarchy,
and can be left to scale neatly with it.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1943938
---
diff --git a/extension.js b/extension.js
index d1bf35b..edf2868 100644
--- a/extension.js
+++ b/extension.js
@@ -25,13 +25,6 @@ var IconContainer = GObject.registerClass(
class IconContainer extends St.Widget {
_init(params) {
super._init(params);
-
- this.connect('notify::scale-x', () => {
- this.queue_relayout();
- });
- this.connect('notify::scale-y', () => {
- this.queue_relayout();
- });
}
vfunc_get_preferred_width(forHeight) {

View File

@ -1,57 +1,35 @@
%global shell_version 40.rc
%global upstream_version 40.rc
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 44.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Name: gnome-shell-extension-background-logo
Version: 40.0~rc
Release: 4%{?dist}
Summary: Background logo extension for GNOME Shell
* Mon Mar 20 2023 Florian Müllner <fmuellner@redhat.com> - 44.0-1
- Update to 44.0
License: GPLv2+
URL: https://pagure.io/background-logo-extension
Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{upstream_version}.tar.xz
BuildArch: noarch
* Tue Feb 14 2023 Florian Müllner <fmuellner@redhat.com> - 44~beta-1
- Update to 44.beta
BuildRequires: meson
BuildRequires: glib2-devel
BuildRequires: git
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 43.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Requires: gnome-shell >= %{shell_version}
Requires: system-logos
* Sat Sep 17 2022 Florian Müllner <fmuellner@redhat.com> - 43.0-1
- Update to 43.0
Patch0: 0001-Adjust-default-values-for-RHEL.patch
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 42.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
# https://pagure.io/background-logo-extension/pull-request/32
Patch1: 32.patch
* Mon Apr 04 2022 Florian Müllner <fmuellner@redhat.com> - 42.0-1
- Update to 42.0
Patch2: 0001-Support-positioning-at-the-top.patch
Patch3: 0001-prefs-Scale-preview-border.patch
* Tue Feb 15 2022 Florian Müllner <fmuellner@redhat.com> - 42~beta-1
- Update to 42.beta
%description
Show your pride! Display the Fedora logo (or any other graphic) in the corner of your desktop.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 41.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
%prep
%autosetup -n background-logo-extension-%{upstream_version} -S git
* Wed Sep 29 2021 Florian Müllner <fmuellner@redhat.com> - 41.0-1
- Update to 41.0
%build
%meson
%meson_build
%install
%meson_install
%files
%license COPYING
%{_datadir}/glib-2.0/schemas/org.fedorahosted.background-logo-extension.gschema.xml
%{_datadir}/gnome-shell/extensions/background-logo@fedorahosted.org/
%changelog
* Mon Feb 28 2022 Florian Müllner <fmuellner@redhat.com> - 40.0~rc-4
- Adjust default values for RHEL
Resolves: #2057150
* Tue Feb 22 2022 Florian Müllner <fmuellner@redhat.com> - 40.0~rc-3
- Backport support for top positioning in RHEL
Related: #2052594
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 40.0~rc-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Mar 31 2021 Michael Catanzaro <mcatanzaro@redhat.com> - 40.0~rc-2
- Fix logo flickering

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -0,0 +1,43 @@
%global tarball_version %%(echo %{version} | tr '~' '.')
%global shell_version %%(cut -d "." -f 1 <<<%{version})
Name: gnome-shell-extension-background-logo
Version: 47.0
Release: %autorelease
Summary: Background logo extension for GNOME Shell
License: GPL-2.0-or-later
URL: https://pagure.io/background-logo-extension
Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{tarball_version}.tar.xz
Patch0: 0001-Adjust-default-values-for-AlmaLinux.patch
BuildArch: noarch
BuildRequires: meson
BuildRequires: glib2-devel
BuildRequires: git
Requires: gnome-shell >= %{shell_version}
Requires: system-logos
%description
Show your pride! Display the Fedora logo (or any other graphic) in the corner of your desktop.
%prep
%autosetup -n background-logo-extension-%{tarball_version} -S git -p1
%build
%meson
%meson_build
%install
%meson_install
%files
%license COPYING
%{_datadir}/glib-2.0/schemas/org.fedorahosted.background-logo-extension.gschema.xml
%{_datadir}/gnome-shell/extensions/background-logo@fedorahosted.org/
%changelog
%autochangelog

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (background-logo-extension-47.0.tar.xz) = 942bf3f6941c7b5540c24817232301bc1e60dc3ef9a7c0beb34c48fa0e24a9f3b7bf409d3cb27fedea95570f0478bd9ef36ff546441970d2548c2846fa9530df