Skip to content

Commit b07162c

Browse files
committed
# Correcting the off bit dimension
1 parent 3d6ded6 commit b07162c

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

adafruit_displayio_layout/widgets/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ def rectangle_helper(
5353
5454
"""
5555
if bitmaptool:
56-
bitmaptools.fill_region(
57-
bitmap, x0, y0, x0 + width - 1, y0 + height - 1, color_index
58-
)
56+
bitmaptools.fill_region(bitmap, x0, y0, x0 + width, y0 + height, color_index)
5957
else:
6058
rect = vectorio.Rectangle(width, height)
6159
vectorio.VectorShape(

adafruit_displayio_layout/widgets/cartesian.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
import displayio
2828
import terminalio
29-
import vectorio
3029
from adafruit_display_text import bitmap_label
30+
import vectorio
3131
from adafruit_displayio_layout.widgets.widget import Widget
3232
from adafruit_displayio_layout.widgets import rectangle_helper
3333

@@ -512,22 +512,3 @@ def update_line(self, x: int, y: int) -> None:
512512
local_y,
513513
1,
514514
)
515-
516-
def set_widget_style(self, new_style: str) -> None:
517-
"""set_widget_style function
518-
Allows to set the widget style
519-
:param str new_style: style for the widget
520-
:return: None
521-
"""
522-
# import would change after library packaging
523-
# pylint: disable=import-outside-toplevel
524-
try:
525-
from adafruit_styles import get_hex
526-
from adafruit_styles import styles
527-
528-
colorset = styles.THEME
529-
self._pointer_color = get_hex(colorset[new_style]["TEXT"])
530-
self._font_color = get_hex(colorset[new_style]["TEXT"])
531-
self._draw_ticks()
532-
except ImportError:
533-
print("This feature is not yet implemented")

0 commit comments

Comments
 (0)