add option to scale window_logo via window_logo_scale#7534
add option to scale window_logo via window_logo_scale#7534kovidgoyal merged 3 commits intokovidgoyal:masterfrom
Conversation
|
Looks OK but perhaps make it window_logo width% [height%] so that each can be specified independently. Having one number means % A value of zero means no scaling in that dimension. A single zero (the And make it a float rather than an int so we can get higher precision. |
… window_logo_scale
|
Implemented comments, not the cleanest way to implement the cases but should be quite clear the intent of each case at a glance. Was especially unsure on implementing the optional parameter for the height, decided -1 as a default would be sufficient for initial implementation but if there is a more clear way to handle this with the framework that I didn't catch point me to it! |
Implements what was discussed in #7532.
New option
window_logo_scaletakes int 0-100, scales the window logo image to x% of the window dimensions (smallest dimension sets scale).Problem, using the current window_logo, you are able to position and clamp, but unable to enable scaling such that the logo does not take up too much space on a small terminal or be too small on a large terminal. Alternative solution would be to use background_image with cscale, yet if you want to have a logo anywhere other than the centre of the terminal, this quickly falls apart once you begin resizing the terminal outside the aspect ratio of the original image.

Adding the option to scale the window logo allows for the original goal of #7532 while being quite generic and overall a very minor code addition.

Here is an example of the proposed implementation to demonstrate the new option.