Compare commits

..

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

8 changed files with 265 additions and 80 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
background-logo-extension-47.alpha.tar.xz
SOURCES/background-logo-extension-40.rc.tar.xz

View File

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

View File

@ -0,0 +1,34 @@
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

@ -0,0 +1,135 @@
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

@ -0,0 +1,40 @@
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

33
SOURCES/32.patch Normal file
View File

@ -0,0 +1,33 @@
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,24 +1,14 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global tarball_version %%(echo %{version} | tr '~' '.')
%global shell_version %%(cut -d "." -f 1 <<<%{version})
%global shell_version 40.rc
%global upstream_version 40.rc
Name: gnome-shell-extension-background-logo
Version: 47~alpha
Release: %autorelease
Version: 40.0~rc
Release: 4%{?dist}
Summary: Background logo extension for GNOME Shell
License: GPL-2.0-or-later
License: GPLv2+
URL: https://pagure.io/background-logo-extension
Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{tarball_version}.tar.xz
Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{upstream_version}.tar.xz
BuildArch: noarch
BuildRequires: meson
@ -28,11 +18,19 @@ BuildRequires: git
Requires: gnome-shell >= %{shell_version}
Requires: system-logos
Patch0: 0001-Adjust-default-values-for-RHEL.patch
# https://pagure.io/background-logo-extension/pull-request/32
Patch1: 32.patch
Patch2: 0001-Support-positioning-at-the-top.patch
Patch3: 0001-prefs-Scale-preview-border.patch
%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
%autosetup -n background-logo-extension-%{upstream_version} -S git
%build
%meson
@ -47,66 +45,13 @@ Show your pride! Display the Fedora logo (or any other graphic) in the corner of
%{_datadir}/gnome-shell/extensions/background-logo@fedorahosted.org/
%changelog
## START: Generated by rpmautospec
* Tue Jul 23 2024 Florian Müllner <fmuellner@redhat.com> - 47~alpha-1
- Update to 47.alpha
* Mon Feb 28 2022 Florian Müllner <fmuellner@redhat.com> - 40.0~rc-4
- Adjust default values for RHEL
Resolves: #2057150
* Wed Jun 26 2024 Tomas Pelka <tpelka@redhat.com> - 46.0-3
- Add gating.yaml via API
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 46.0-2
- Bump release for June 2024 mass rebuild
* Thu Apr 11 2024 Florian Müllner <fmuellner@gnome.org> - 46.0-1
- Backport changes from F40
* Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 45~beta-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 45~beta-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 45~beta-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Dec 13 2023 Miroslav Suchý <msuchy@redhat.com> - 45~beta-2
- Migrate to SPDX license
* Mon Aug 07 2023 Florian Müllner <fmuellner@gnome.org> - 45~beta-1
- Update to 45.beta
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 44.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Mar 20 2023 Florian Müllner <fmuellner@redhat.com> - 44.0-1
- Update to 44.0
* Tue Feb 14 2023 Florian Müllner <fmuellner@redhat.com> - 44~beta-1
- Update to 44.beta
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 43.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Sep 17 2022 Florian Müllner <fmuellner@redhat.com> - 43.0-1
- Update to 43.0
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 42.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Apr 04 2022 Florian Müllner <fmuellner@redhat.com> - 42.0-1
- Update to 42.0
* Tue Feb 15 2022 Florian Müllner <fmuellner@redhat.com> - 42~beta-1
- Update to 42.beta
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 41.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Sep 29 2021 Florian Müllner <fmuellner@redhat.com> - 41.0-1
- Update to 41.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 40.0~rc-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Feb 22 2022 Florian Müllner <fmuellner@redhat.com> - 40.0~rc-3
- Backport support for top positioning in RHEL
Related: #2052594
* Wed Mar 31 2021 Michael Catanzaro <mcatanzaro@redhat.com> - 40.0~rc-2
- Fix logo flickering
@ -267,5 +212,3 @@ Show your pride! Display the Fedora logo (or any other graphic) in the corner of
* Fri Nov 07 2014 Kalev Lember <kalevlember@gmail.com> - 3.14.0-1
- Initial Fedora packaging
## END: Generated by rpmautospec

View File

@ -1 +0,0 @@
SHA512 (background-logo-extension-47.alpha.tar.xz) = 07e79049eefbeedf1d22431944d31ef4e94844f806ba2f82870c70281b6af98b2782668e5db75a24d9bd95a343ec27e2335eec930827fbca47161b7b9d442cf0