Closed LouisPi closed 5 years ago
Merging #150 into devel will increase coverage by
0.72%
. The diff coverage is92.53%
.
@@ Coverage Diff @@
## devel #150 +/- ##
==========================================
+ Coverage 39.83% 40.56% +0.72%
==========================================
Files 247 248 +1
Lines 19703 19947 +244
==========================================
+ Hits 7849 8091 +242
- Misses 11854 11856 +2
Impacted Files | Coverage Δ | |
---|---|---|
ui/printer.py | 65.78% <100%> (+15.78%) |
:arrow_up: |
ui/utils.py | 93.8% <90.47%> (-2.03%) |
:arrow_down: |
ui/tests/test_printer.py | 75% <95.45%> (+20.45%) |
:arrow_up: |
ui/overlays.py | 97.24% <0%> (-2.76%) |
:arrow_down: |
apps/media_apps/draw/main.py | 37.43% <0%> (-1.07%) |
:arrow_down: |
apps/wifi_country/main.py | 27.02% <0%> (ø) |
|
ui/base_list_ui.py | 76.69% <0%> (+0.25%) |
:arrow_up: |
apps/clock/main.py | 21.31% <0%> (+0.47%) |
:arrow_up: |
ui/funcs.py | 67.79% <0%> (+1.12%) |
:arrow_up: |
ui/tests/test_listbox.py | 84.9% <0%> (+1.23%) |
:arrow_up: |
... and 6 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5bf6412...82421fe. Read the comment docs.
Definitely not ready yet just thought I would start a pull request. Renaming variables was on my TODO as I realise the names are confusing. The typo is because I originally tried out the new Graphics Printer in an old ZPUI directory I made and had to copy everything over. Deleted the old directory now so that shouldn't happen again. Am thinking of scrapping my current technique for resizing to make an image bigger and utilising some of this (https://gist.github.com/tomvon/ae288482869b495201a0) code.
No tests added yet. Variable names might need clearing up to avoid confusion, comments need to be added. I have tested this as well as I can on my screen trying out multiple image sizes. Will try sort any issues listed ASAP. Help on making tests for it would be appreciated =D.
TODO - add tests
Ahha. There's actually a lot of code in GraphicsPrinter
by now (which makes it harder to read), and I think apps/other UI elements could make use of that as well, could you maybe make it into a separate function? I.e. fit_image_to_screen(image, o)
.
Okay, I will try add that!
Where do you want it added? In printer.py still?
That's a good question! I think it'd make sense if that code were in ui/utils.py
.
Okay thanks.
Thank you!
No problem - you pretty much told me how to do all the tests though =D so thank you as well.
Well, there's no tutorial for ZP devs on that yet =) Also, it's not something people do a lot, unfortunately.
DO NOT ACCEPT YET. Should finish it tonight.
Edit - resizing script should be working, see comment below.