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
Added: Add support for using image as background #3079
base: master
Are you sure you want to change the base?
Commits on May 3, 2023
-
Added: Add generic method
startActivityForResult()
toActivityUtils
This method allows to launch an Activity for result.
Configuration menu - View commit details
-
Copy full SHA for 80b5a3c - Browse repository at this point
Copy the full SHA 80b5a3cView commit details -
Added: Add the
ImageUtils
class for imagesThe `ImageUtils` class includes utility functions for image manipulation and storage. It provides functions for loading bitmap or drawable, storing, resizing and compressing images.
Configuration menu - View commit details
-
Copy full SHA for 4d80d11 - Browse repository at this point
Copy the full SHA 4d80d11View commit details -
Added: Add
getIntColorFromString()
andswap()
into theDataUtils
`getIntColorFromString()` can be used to get an int color by parsing the string color. Color can be in the form of `#AARRGGBB` or `#RRGGBB`. `swap()` can be used to exchange x and y value present in `Point`.
Configuration menu - View commit details
-
Copy full SHA for 8a4b165 - Browse repository at this point
Copy the full SHA 8a4b165View commit details -
Added: Add support to use the image as a background
This change allows the user to use an image as the terminal's background. Add option to select or remove the background image in the context menu -> style. `TermuxBackgroundManager` holds the responsibility of making background changes. It provides functionalities: - Change the background color. - Set or remove the background image. - Selecting an image from the gallery. - Restore the image if available. - Notify about the changes made to the background. `updateBackgroundColor()` is moved from `TermuxTerminalSessionActivityClient` to `TermuxBackgroundManager`. Images are stored in the termux data home directory. The image is resized corresponding to the display resolution and compressed before saving. Background overlay color is read from the `termux.properties` file with the key `background-overlay-color`. The default value is set to `#59000000`. To change the background overlay color, add `background-overlay-color=<color>` to `termux.properties` file. Supported color formats are `#AARRGGBB` or `#RRGGBB`.
Configuration menu - View commit details
-
Copy full SHA for 7cc8a79 - Browse repository at this point
Copy the full SHA 7cc8a79View commit details -
Added: Add setting to enable or disable background image loading
The user can enable or disable background image loading from the termux setting available in `Termux Style` preferences with this commit. If some malformed image is stored as background, disable image loading in the setting. Disabling the image from the setting will not delete image files and can be restored.
Configuration menu - View commit details
-
Copy full SHA for 4dc3bf6 - Browse repository at this point
Copy the full SHA 4dc3bf6View commit details -
Fixed: Fix default background landscape path comment
Change comment for landscape background from `background.jpeg` to `background_landscape.jpeg`.
Configuration menu - View commit details
-
Copy full SHA for 5f4d6ef - Browse repository at this point
Copy the full SHA 5f4d6efView commit details -
Changed: Change background of the Extra Keys Toolbar corresponding to…
… the preference Set overlay color to the `TerminalToolbarViewPager` background when the image is background. And set the `ExtraKeysView` button to transparent. If the background is color, then set it to the default value.
Configuration menu - View commit details
-
Copy full SHA for b933cba - Browse repository at this point
Copy the full SHA b933cbaView commit details -
Fixed: Fix
ImageUtils
log tag valueFileUtils
toImageUtils
Co-authored-by: Susko3 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0b2322d - Browse repository at this point
Copy the full SHA 0b2322dView commit details -
Added|Changed: Create background directory and keep original image
Add `TERMUX_BACKGROUND_DIR_PATH` and `TERMUX_BACKGROUND_DIR` to store background images. Use `TERMUX_BACKGROUND_IMAGE_PATH` and `TERMUX_BACKGROUND_IMAGE_FILE` to store original compressed image. Change `TERMUX_BACKGROUND_IMAGE_PORTRAIT_PATH` and `TERMUX_BACKGROUND_IMAGE_PORTRAIT_FILE` to store portrait image.
Configuration menu - View commit details
-
Copy full SHA for 49f8a9f - Browse repository at this point
Copy the full SHA 49f8a9fView commit details -
Fixed: Fix image resizing by regenerating image files
Compress to jpeg and store original image to `TERMUX_BACKGROUND_DIR`. Use `Activity` size instead of display size. If portrait and landcape files are deleted or `Activity` size is changed, then regenerate images using original image.
Configuration menu - View commit details
-
Copy full SHA for ad77748 - Browse repository at this point
Copy the full SHA ad77748View commit details -
Fixed: Fix overlay color filter messing up screen on
API <=28
For Android <= 9, `PorterDuff.Mode.MULTIPLY` causing unusable screen lag. Change to `PorterDuff.Mode.DARKEN`.
Configuration menu - View commit details
-
Copy full SHA for 6aa99e7 - Browse repository at this point
Copy the full SHA 6aa99e7View commit details