Use metadata to select a fitting method for the presplash screen#408
Use metadata to select a fitting method for the presplash screen#408j-santander wants to merge 1 commit intokivy:masterfrom
Conversation
|
I'm sorry that I somehow missed this PR. It seems like a great addition, and if I'd noticed it I'd have raised it in issues like #481 I'll merge it now - I'm not certain about what api would be best, but the details can be tweaked when a setting is added for it, I'll consider the exact options maybe unstable for now. |
|
Okay, I've merged this manually to the old_toolchain branch but not to master yet. This would be a simple feature copy to the new toolchain if anyone would like to do it, I've made an issue about it. |
|
@inclement please advice on how I should proceed to submit the fix suggested by @gorgonaut04 |
|
@admica There is no python access to this image, it is displayed while python is initialising. We'd be happy to accept PRs to make it more configurable though. |
|
@j-santander What exactly is this fix, i.e. what changes to what file? |
|
as indicated by @gorgonaut04, on my commit: } else {
// default
mx = ((float) mWidth / bitmapWidth) / 2.0f;
my = ((float) mHeight / bitmapWidth) / 2.0f;
}should have been: } else {
// default
mx = ((float) mWidth / bitmapWidth) / 2.0f;
my = ((float) mHeight / bitmapHeight) / 2.0f;
} |
This is based on pull request #372
I've modified the original pull request by @Mystic-Mirage, making it controllable by a metadata property ("presplash-fit").
I've kept the transformation coded by @Mystic-Mirage as "fit" (not sure if it is correct, for a square image, in my screen, it shows with a border surrounding the image).
I've added two additional transformations, "width" will make the image fit the screen horizontally, while "height" will make the image fit the screen vertically.
Any other option, or the absence of the metadata property will use the default (existing) transformation that renders the image at the current screen resolution.