Skip to content

Commit a8c902b

Browse files
author
funnygeeker
committed
修复 self.font_size 名称冲突
1 parent fb18b05 commit a8c902b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/easydisplay.mpy

5 Bytes
Binary file not shown.

libs/easydisplay.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ def __init__(self, display,
6969
self.color_type = color_type
7070
self.color = color
7171
self.bg_color = bg_color
72-
self.font_size = size
72+
self.size = size
7373
self.auto_wrap = auto_wrap
7474
self.half_char = half_char
7575
self.line_spacing = line_spacing
76+
self.font_size = None
7677
self.font_bmf_info = None
7778
self.font_version = None
7879
self.font_file = None
@@ -293,7 +294,7 @@ def text(self, s: str, x: int, y: int,
293294
if key is None:
294295
key = self._key
295296
if size is None:
296-
size = self.font_size
297+
size = self.size
297298
if show is None:
298299
show = self._show
299300
if clear is None:

0 commit comments

Comments
 (0)