|
77 | 77 | SIZE_8_8_INCH = "8.8\"" |
78 | 78 | SIZE_8_8_INCH_NEWREV = "8.8\" / 9.2\" (V1.X new HW rev.)" |
79 | 79 | SIZE_12_3_INCH = "12.3\"" |
| 80 | +SIZE_2_8_INCH_NEWREV = "2.8\" round (V1.X new HW rev.)" |
80 | 81 |
|
81 | 82 | # List of sizes that can be selected |
82 | 83 | size_list = ( |
83 | 84 | SIZE_0_96_INCH, |
84 | 85 | SIZE_2_x_INCH, |
| 86 | + SIZE_2_8_ROUND_USB, |
85 | 87 | SIZE_3_5_INCH, |
86 | 88 | SIZE_4_6_INCH, |
87 | 89 | SIZE_5_INCH, |
|
108 | 110 | ('TUR_USB', SIZE_8_8_INCH): TURING_MODEL, |
109 | 111 | ('TUR_USB', SIZE_8_8_INCH_NEWREV): TURING_MODEL, |
110 | 112 | ('TUR_USB', SIZE_12_3_INCH): TURING_MODEL, |
| 113 | + ('TUR_USB', SIZE_2_8_ROUND_USB): TURING_MODEL, |
111 | 114 | ('WEACT_A', SIZE_3_5_INCH): WEACT_MODEL, |
112 | 115 | ('WEACT_B', SIZE_0_96_INCH): WEACT_MODEL, |
113 | 116 |
|
|
132 | 135 | (TURING_MODEL, SIZE_8_8_INCH): 'C', |
133 | 136 | (TURING_MODEL, SIZE_8_8_INCH_NEWREV): 'TUR_USB', |
134 | 137 | (TURING_MODEL, SIZE_12_3_INCH): 'TUR_USB', |
| 138 | + (TURING_MODEL, SIZE_2_8_ROUND_USB): 'TUR_USB', |
135 | 139 | (USBPCMONITOR_MODEL, SIZE_3_5_INCH): 'A', |
136 | 140 | (USBPCMONITOR_MODEL, SIZE_5_INCH): 'A', |
137 | 141 | (WEACT_MODEL, SIZE_0_96_INCH): 'WEACT_B', |
@@ -462,13 +466,15 @@ def load_config_values(self): |
462 | 466 |
|
463 | 467 | # Guess display size from theme in the configuration |
464 | 468 | size = get_theme_size(self.config['config']['THEME']) |
465 | | - size = size.replace(_SIZE_2_1_INCH, SIZE_2_x_INCH) # If a theme is for 2.1" then it is for all 2.x" |
466 | | - size = size.replace(_SIZE_2_8_INCH, SIZE_2_x_INCH) # If a theme is for 2.8" then it is for all 2.x" |
467 | | - size = size.replace(_SIZE_9_2_INCH, |
468 | | - SIZE_8_8_INCH_NEWREV) # If a theme is for 9.2" then it is for 8.8"/9.2" (new rev) |
| 469 | + if size == _SIZE_2_1_INCH or size == _SIZE_2_8_INCH: |
| 470 | + size = SIZE_2_x_INCH # If a theme is for 2.1" or 2.8" then it is for all 2.x" |
| 471 | + elif size == _SIZE_9_2_INCH: |
| 472 | + size = SIZE_8_8_INCH_NEWREV # If a theme is for 9.2" then it is for 8.8"/9.2" (new rev) |
469 | 473 | try: |
470 | 474 | if size == SIZE_8_8_INCH and self.config['display']['REVISION'] == 'TUR_USB': |
471 | 475 | size = SIZE_8_8_INCH_NEWREV |
| 476 | + if size == SIZE_2_x_INCH and self.config['display']['REVISION'] == 'TUR_USB': |
| 477 | + size = SIZE_2_8_ROUND_USB |
472 | 478 | self.size_cb.set(size) |
473 | 479 | except: |
474 | 480 | self.size_cb.current(0) |
@@ -616,7 +622,7 @@ def on_size_change(self, e=None): |
616 | 622 | size = self.size_cb.get() |
617 | 623 |
|
618 | 624 | # For '2.1" / 2.8"' size, search for themes of both sizes |
619 | | - if size == SIZE_2_x_INCH: |
| 625 | + if size == SIZE_2_x_INCH or size == SIZE_2_8_ROUND_USB: |
620 | 626 | themes = get_themes(_SIZE_2_1_INCH) |
621 | 627 | themes += get_themes(_SIZE_2_8_INCH) |
622 | 628 | # For 8.8" & 9.2" sizes, search for themes of both sizes |
|
0 commit comments