Mageia Bugzilla – Attachment 8392 Details for
Bug 19292
Default grub2-theme, plymouth, sddm and ksplash backgrounds should all match at correct aspect ratio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
proposed change to theme to use default.png rather than default.jpg
file_19292.txt (text/plain), 2.54 KB, created by
Barry Jackson
on 2016-09-08 00:27:01 CEST
(
hide
)
Description:
proposed change to theme to use default.png rather than default.jpg
Filename:
MIME Type:
Creator:
Barry Jackson
Created:
2016-09-08 00:27:01 CEST
Size:
2.54 KB
patch
obsolete
>diff --git a/Mageia-Default/plymouth/background.png b/Mageia-Default/plymouth/background.png >deleted file mode 100755 >index 55ca2b5..0000000 >Binary files a/Mageia-Default/plymouth/background.png and /dev/null differ >diff --git a/Mageia-Default/plymouth/background.png b/Mageia-Default/plymouth/background.png >new file mode 120000 >index 0000000..a866b31 >--- /dev/null >+++ b/Mageia-Default/plymouth/background.png >@@ -0,0 +1 @@ >+/usr/share/mga/backgrounds/default.png >\ No newline at end of file >diff --git a/mga-bg-res/mga-bg-res.sh b/mga-bg-res/mga-bg-res.sh >index 3dc8416..4d6c777 100755 >--- a/mga-bg-res/mga-bg-res.sh >+++ b/mga-bg-res/mga-bg-res.sh >@@ -2,7 +2,7 @@ > > bgpath="/usr/share/mga/backgrounds" > theme="Mageia-Default" >-curlink=$(readlink $bgpath/default.jpg) >+curlink=$(readlink $bgpath/default.png) > > # Search for the optimal background resolution according to monitor-edid > if [ -e /usr/sbin/monitor-edid ]; then >@@ -16,12 +16,12 @@ if [ -z $res ]; then > fi > > # Check if the symlink is already good >-if [ "$curlink" = "$bgpath/$theme-$res.jpg" ]; then >+if [ "$curlink" = "$bgpath/$theme-$res.png" ]; then > exit 0 > fi > > # Check if this is a supported resolution, if not, find the background with a similar aspect ratio >-if [ ! -e "$bgpath/$theme-$res.jpg" ]; then >+if [ ! -e "$bgpath/$theme-$res.png" ]; then > width=$(echo $res | cut -f1 -d"x") > height=$(echo $res | cut -f2 -d"x") > # Bash only does integer arithmetic, we multiply everything by 1000 to workaround this >@@ -38,15 +38,18 @@ fi > > # Check again if the symlink does not already point to this new resolution > # If not, create a new symlink >-if [ "$curlink" != "$bgpath/$theme-$res.jpg" ]; then >- if [ -e "$bgpath/$theme-$res.jpg" ]; then >+if [ "$curlink" != "$bgpath/$theme-$res.png" ]; then >+ if [ -e "$bgpath/$theme-$res.png" ]; then >+# keep .jpg for now as it is currently used by grub2 themes to get resolution > ln -sf $bgpath/$theme-$res.jpg $bgpath/default.jpg >+ ln -sf $bgpath/$theme-$res.png $bgpath/default.png > if [ -d /boot/grub2/themes ]; then > cp -f $bgpath/$theme-$res.png /boot/grub2/themes/grub2-mageia-default.png > fi > else >- echo -e "Could not find this file: $bgpath/$theme-$res.jpg." >+ echo -e "Could not find this file: $bgpath/$theme-$res.png" > echo "Please check that the mageia-theme-Default package is properly installed, or disable" > echo "the mga-bg-res systemd service if you do not want to force using the Mageia theme." > fi > fi >+
diff --git a/Mageia-Default/plymouth/background.png b/Mageia-Default/plymouth/background.png deleted file mode 100755 index 55ca2b5..0000000 Binary files a/Mageia-Default/plymouth/background.png and /dev/null differ diff --git a/Mageia-Default/plymouth/background.png b/Mageia-Default/plymouth/background.png new file mode 120000 index 0000000..a866b31 --- /dev/null +++ b/Mageia-Default/plymouth/background.png @@ -0,0 +1 @@ +/usr/share/mga/backgrounds/default.png \ No newline at end of file diff --git a/mga-bg-res/mga-bg-res.sh b/mga-bg-res/mga-bg-res.sh index 3dc8416..4d6c777 100755 --- a/mga-bg-res/mga-bg-res.sh +++ b/mga-bg-res/mga-bg-res.sh @@ -2,7 +2,7 @@ bgpath="/usr/share/mga/backgrounds" theme="Mageia-Default" -curlink=$(readlink $bgpath/default.jpg) +curlink=$(readlink $bgpath/default.png) # Search for the optimal background resolution according to monitor-edid if [ -e /usr/sbin/monitor-edid ]; then @@ -16,12 +16,12 @@ if [ -z $res ]; then fi # Check if the symlink is already good -if [ "$curlink" = "$bgpath/$theme-$res.jpg" ]; then +if [ "$curlink" = "$bgpath/$theme-$res.png" ]; then exit 0 fi # Check if this is a supported resolution, if not, find the background with a similar aspect ratio -if [ ! -e "$bgpath/$theme-$res.jpg" ]; then +if [ ! -e "$bgpath/$theme-$res.png" ]; then width=$(echo $res | cut -f1 -d"x") height=$(echo $res | cut -f2 -d"x") # Bash only does integer arithmetic, we multiply everything by 1000 to workaround this @@ -38,15 +38,18 @@ fi # Check again if the symlink does not already point to this new resolution # If not, create a new symlink -if [ "$curlink" != "$bgpath/$theme-$res.jpg" ]; then - if [ -e "$bgpath/$theme-$res.jpg" ]; then +if [ "$curlink" != "$bgpath/$theme-$res.png" ]; then + if [ -e "$bgpath/$theme-$res.png" ]; then +# keep .jpg for now as it is currently used by grub2 themes to get resolution ln -sf $bgpath/$theme-$res.jpg $bgpath/default.jpg + ln -sf $bgpath/$theme-$res.png $bgpath/default.png if [ -d /boot/grub2/themes ]; then cp -f $bgpath/$theme-$res.png /boot/grub2/themes/grub2-mageia-default.png fi else - echo -e "Could not find this file: $bgpath/$theme-$res.jpg." + echo -e "Could not find this file: $bgpath/$theme-$res.png" echo "Please check that the mageia-theme-Default package is properly installed, or disable" echo "the mga-bg-res systemd service if you do not want to force using the Mageia theme." fi fi +
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19292
:
8386
| 8392 |
8413
|
8414
|
8415