-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Scale (fit)" background image mode #2023
base: master
Are you sure you want to change the base?
Conversation
Can you maybe clean this PR up a bit and remove all the l10n changes and other unrelated changes that are merged in? Having those makes this very hard to review at the moment. |
Sorry about that, will do 👍 |
52bc4cd
to
4e6e7d6
Compare
The current "Scale" mode crops out part of the image if the scaled image is larger than the terminal in any direction. This is useful for most cases, such as wallpapers repurposed as terminal backgrounds. However, this may be surprising to users coming from xfce4-terminal, where the equivalent "Scaled" mode tries to fit the background within the terminal in both dimensions. This new "Scale (fit)" mode is meant to emulate this behaviour.
4e6e7d6
to
c4f504c
Compare
I've removed the localization changes and tidied up the scaling code. Please let me know if you'd like me to make any further changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
The current "Scale" mode crops out part of the image if the scaled image is larger than the terminal in any direction. This is useful for most cases, such as wallpapers repurposed as terminal backgrounds. However, this may be surprising to users coming from xfce4-terminal, where the equivalent "Scaled" mode tries to fit the background within the terminal in both dimensions. This new "Scale (fit)" mode is meant to emulate this behaviour.
I'm aware that Tilix is currently in low-maintenance mode and looking for a new maintainer, but since this mostly builds off of the "Scale" background image mode, I feel that this addition is fairly minor. Feel free to close this PR if it would carry too much of a maintenance burden.
Here are some examples of the differences between "Scale" and "Scale (fit)" using a typical background and a background well suited to "Scale (fit)":
Typical background, Scale
Typical background, Scale (fit)
Transparent PNG, Scale
Transparent PNG, Scale (fit)