konqueror: "Set as Background" action on images applies wrong positioning #281

Closed
opened 2 years ago by Leskala · 3 comments

Basic information

  • TDE version: R14.0.12
  • APP version: R14.0.12
  • Distribution: Debian Bullseye
  • System: Linux 5.15.32-v7+
  • Hardware: armv7l
  • Compiler: GNU 10.2.1

Description

Konqueror offers set-as-wallpaper actions in the right-click menu of images
under the "Actions" > "Set as Background" submenu. There are 2 actions in
the "Set as Background" category: "Centered" and "Tiled".
"Tiled" actually does what its name suggests. However, the "Centered" action
does actually lead to "Scaled" in the desktop's wallpaper setting.

Steps to reproduce

  1. using Konqueror, navigate to a folder with an image file inside
  2. right-click on the image, choose "Actions" > "Set as Background" > "Centered"
  3. access KDesktop's configuration dialog (e.g. right-click on desktop > "Configure Desktop...")

Expected result

Just from the naming of the action, the resulting "Position" option in KDesktop should be "Centered".
Alternatively, the Konqueror action could be renamed to "Scaled" - however this wouldn't be a good choice (see notes below).

Actual result

The action results in the "Position" option of KDesktop getting set to "Scaled" instead of "Centered".

Notes

I think "Scaled" is a bad option in general, see #280 for reasoning.
Thus, I'd advise against fixing this in a way of simply renaming the Konqueror action and leaving the "Scaled" behavior. However, "Centered" might not be as much of a frequent use case as a scaled option is for users either.

Therefore, I could see several possible ways to address this issue in a sensible manner while still providing users with a scaled option:

  • keep the "Centered" option, fix its behavior and add a dedicated "Scale & Crop" to the action list
  • replace "Centered" in the Konqueror action list by "Scale & Crop" entirely
<!-- This is a comment. Please fill in the required fields below. The comments provide instructions on how to do so. Note: You do not need to remove comments. --> ## Basic information - TDE version: R14.0.12 - APP version: R14.0.12 - Distribution: Debian Bullseye - System: Linux 5.15.32-v7+ - Hardware: armv7l - Compiler: GNU 10.2.1 ## Description Konqueror offers set-as-wallpaper actions in the right-click menu of images under the "Actions" > "Set as Background" submenu. There are 2 actions in the "Set as Background" category: "Centered" and "Tiled". "Tiled" actually does what its name suggests. However, the "Centered" action does actually lead to "Scaled" in the desktop's wallpaper setting. ## Steps to reproduce 1. using Konqueror, navigate to a folder with an image file inside 2. right-click on the image, choose "Actions" > "Set as Background" > "Centered" 3. access KDesktop's configuration dialog (e.g. right-click on desktop > "Configure Desktop...") ### Expected result Just from the naming of the action, the resulting "Position" option in KDesktop should be "Centered". Alternatively, the Konqueror action could be renamed to "Scaled" - however this wouldn't be a good choice (see notes below). ### Actual result The action results in the "Position" option of KDesktop getting set to "Scaled" instead of "Centered". ## Notes I think "Scaled" is a bad option in general, see #280 for reasoning. Thus, I'd advise against fixing this in a way of simply renaming the Konqueror action and leaving the "Scaled" behavior. However, "Centered" might not be as much of a frequent use case as a scaled option is for users either. Therefore, I could see several possible ways to address this issue in a sensible manner while still providing users with a scaled option: - keep the "Centered" option, fix its behavior *and* add a dedicated "Scale & Crop" to the action list - replace "Centered" in the Konqueror action list by "Scale & Crop" entirely
Poster

The code for this is actually part of KDesktop and seems to be pretty easy to fix and improve:

--- a/opt/trinity/share/apps/konqueror/servicemenus/kdesktopSetAsBackground.desktop.orig
+++ b/opt/trinity/share/apps/konqueror/servicemenus/kdesktopSetAsBackground.desktop
@@ -1,6 +1,6 @@
 [Desktop Entry]
 X-TDE-ServiceTypes=image/*
-Actions=setAsBackground;tileAsBackground;
+Actions=setAsBackground;centerAsBackground;tileAsBackground;
 X-TDE-Submenu=Set as Background
 X-TDE-Submenu[af]=Stel as agtergrond
 X-TDE-Submenu[be]=Зрабіць фонавым малюнкам
@@ -60,6 +60,11 @@ X-TDE-Submenu[zh_CN]=设为背景
 X-TDE-Submenu[zh_TW]=設為背景

 [Desktop Action setAsBackground]
+Name=Best Fit
+Icon=background
+Exec=dcop kdesktop KBackgroundIface setWallpaper %u 8
+
+[Desktop Action centerAsBackground]
 Name=Centered
 Name[af]=Gesentreer
 Name[ar]=مركز
@@ -133,7 +138,7 @@ Name[wa]=Å mitan
 Name[zh_CN]=居中
 Name[zh_TW]=置中
 Icon=background
-Exec=dcop kdesktop KBackgroundIface setWallpaper %u 6
+Exec=dcop kdesktop KBackgroundIface setWallpaper %u 1

 [Desktop Action tileAsBackground]
 Name=Tiled
  • fixes "Centered" to be actually centered (position option index 1 instead of 6)
  • adds "Best Fit" option (more intuitive wording for users than calling it "Scale & Crop" directly imo) which will lead to "Scale & Crop"

Note: the position option argument (index number) of the dcop kdesktop calls might need adjustments in the future depending on whether #280 changes the order of options in KDesktop. Edit: this is unlikely though as the default setting seems to be independent of the option's index order based on my latest findings.

The code for this is actually part of KDesktop and seems to be pretty easy to fix and improve: ```diff --- a/opt/trinity/share/apps/konqueror/servicemenus/kdesktopSetAsBackground.desktop.orig +++ b/opt/trinity/share/apps/konqueror/servicemenus/kdesktopSetAsBackground.desktop @@ -1,6 +1,6 @@ [Desktop Entry] X-TDE-ServiceTypes=image/* -Actions=setAsBackground;tileAsBackground; +Actions=setAsBackground;centerAsBackground;tileAsBackground; X-TDE-Submenu=Set as Background X-TDE-Submenu[af]=Stel as agtergrond X-TDE-Submenu[be]=Зрабіць фонавым малюнкам @@ -60,6 +60,11 @@ X-TDE-Submenu[zh_CN]=设为背景 X-TDE-Submenu[zh_TW]=設為背景 [Desktop Action setAsBackground] +Name=Best Fit +Icon=background +Exec=dcop kdesktop KBackgroundIface setWallpaper %u 8 + +[Desktop Action centerAsBackground] Name=Centered Name[af]=Gesentreer Name[ar]=مركز @@ -133,7 +138,7 @@ Name[wa]=Å mitan Name[zh_CN]=居中 Name[zh_TW]=置中 Icon=background -Exec=dcop kdesktop KBackgroundIface setWallpaper %u 6 +Exec=dcop kdesktop KBackgroundIface setWallpaper %u 1 [Desktop Action tileAsBackground] Name=Tiled ``` - fixes "Centered" to be actually centered (position option index 1 instead of 6) - adds "Best Fit" option (more intuitive wording for users than calling it "Scale & Crop" directly imo) which will lead to "Scale & Crop" Note: the position option argument (index number) of the `dcop kdesktop` calls might need adjustments in the future depending on whether #280 changes the order of options in KDesktop. **Edit:** this is unlikely though as the default setting seems to be independent of the option's index order based on my latest findings.
Owner

PR #285 adds all the avaiable options to the "Set as Background" menu.

PR #285 adds all the avaiable options to the "Set as Background" menu.
MicheleC added this to the R14.0.13 release milestone 2 years ago
Owner

Fixed by PR #285.

Fixed by PR #285.
MicheleC closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdebase#281
Loading…
There is no content yet.