Commit 76e1a30
committed
Squashed commit of the following:
commit 6cc09dd
Author: Dave Amies <damies13@gmail.com>
Date: Sat Feb 26 14:09:19 2022 +1000
My tweaks to atest to make it run locally
commit 2dd9d9d
Author: Dave Amies <damies13@gmail.com>
Date: Sat Feb 26 14:07:38 2022 +1000
Will now detect the screen scaling ratio and adjust
This update will now detect the screen scaling ratio and adjust accordingly. I tested it using "tests/atest/calculator.robot" on a mac with a Retina display running OSX 12.0.1 I don't have a windows machine to test on, but based on comments in [pyautogui issue #589](asweigart/pyautogui#589) this should work for the various windows scaling ratios.
This replaces the self.has_retina which wasn't working as it was returning false on my machine even though it does indeed have a retina display.
__get_pixel_ratio should only get called the first time _locate is called, that was my experience in testing, though perhaps it should be called every time as windows users could potentially change their display scaling during the test. Also I don't know of an OS that supports it now but I guess it's possible in the future an OS may have a scaling factor less than 100% and this change won't support that either.
Issue eficode#621 parent 8c725b5 commit 76e1a30
File tree
7 files changed
+15
-7
lines changed- src/ImageHorizonLibrary/recognition
- tests/atest
- reference_images/calculator
- close_button
- inputs_folder
- or_button
7 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
206 | | - | |
207 | | - | |
208 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
209 | 216 | | |
210 | 217 | | |
211 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
0 commit comments