Skip to content

Commit 1d5e51b

Browse files
committed
Merge branch 'main' into outlined_label
2 parents caa4100 + c3be259 commit 1d5e51b

19 files changed

+74
-77
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ For a board with a built-in display.
4545
text_area = label.Label(terminalio.FONT, text=text)
4646
text_area.x = 10
4747
text_area.y = 10
48-
board.DISPLAY.show(text_area)
48+
board.DISPLAY.root_group = text_area
4949
while True:
5050
pass
5151

adafruit_display_text/bitmap_label.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@
2727
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"
2828

2929
import displayio
30-
import bitmaptools
3130
from adafruit_display_text import LabelBase
3231

32+
try:
33+
import bitmaptools
34+
except ImportError:
35+
# We have a slower fallback for bitmaptools
36+
pass
37+
3338
try:
3439
from typing import Optional, Tuple
3540
from fontio import FontProtocol
@@ -441,7 +446,7 @@ def _place_text(
441446

442447
self._blit(
443448
bitmap,
444-
xposition + my_glyph.dx,
449+
max(xposition + my_glyph.dx, 0),
445450
y_blit_target,
446451
my_glyph.bitmap,
447452
x_1=glyph_offset_x,

docs/conf.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,10 @@
101101
# The theme to use for HTML and HTML Help pages. See the documentation for
102102
# a list of builtin themes.
103103
#
104-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
105-
106-
if not on_rtd: # only import and set the theme if we're building docs locally
107-
try:
108-
import sphinx_rtd_theme
109-
110-
html_theme = "sphinx_rtd_theme"
111-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
112-
except:
113-
html_theme = "default"
114-
html_theme_path = ["."]
115-
else:
116-
html_theme_path = ["."]
104+
import sphinx_rtd_theme
105+
106+
html_theme = "sphinx_rtd_theme"
107+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
117108

118109
# Add any paths that contain custom static files (such as style sheets) here,
119110
# relative to this directory. They are copied after the builtin static files,

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
#
33
# SPDX-License-Identifier: Unlicense
44

5-
sphinx>=4.0.0
5+
sphinx
66
sphinxcontrib-jquery
7+
sphinx-rtd-theme

0 commit comments

Comments
 (0)