Skip to content

Commit 7d61825

Browse files
committed
Merge branch 'adafruit_master' into base_alignement_proposal
# Conflicts: # adafruit_display_text/label.py
2 parents 06238ab + 913c82e commit 7d61825

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
repos:
66
- repo: https://github.com/python/black
7-
rev: stable
7+
rev: 20.8b1
88
hooks:
99
- id: black
1010
- repo: https://github.com/fsfe/reuse-tool
11-
rev: latest
11+
rev: v0.12.1
1212
hooks:
1313
- id: reuse
1414
- repo: https://github.com/pre-commit/pre-commit-hooks

adafruit_display_text/bitmap_label.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,11 @@ def bounding_box(self):
563563
@property
564564
def scale(self):
565565
"""Set the scaling of the label, in integer values"""
566-
return self._scale
566+
return self.local_group.scale
567567

568568
@scale.setter
569569
def scale(self, new_scale):
570570
self.local_group.scale = new_scale
571-
self._scale = new_scale
572571
self.anchored_position = self._anchored_position # update the anchored_position
573572

574573
@property
@@ -580,7 +579,7 @@ def line_spacing(self):
580579
@line_spacing.setter
581580
def line_spacing(self, new_line_spacing):
582581
if self._save_text:
583-
self._reset_text(line_spacing=new_line_spacing)
582+
self._reset_text(line_spacing=new_line_spacing, scale=self.scale)
584583
else:
585584
raise RuntimeError("line_spacing is immutable when save_text is False")
586585

@@ -621,7 +620,7 @@ def text(self):
621620

622621
@text.setter # Cannot set color or background color with text setter, use separate setter
623622
def text(self, new_text):
624-
self._reset_text(text=new_text)
623+
self._reset_text(text=new_text, scale=self.scale)
625624

626625
@property
627626
def font(self):
@@ -632,7 +631,7 @@ def font(self):
632631
def font(self, new_font):
633632
self._font = new_font
634633
if self._save_text:
635-
self._reset_text(font=new_font)
634+
self._reset_text(font=new_font, scale=self.scale)
636635
else:
637636
raise RuntimeError("font is immutable when save_text is False")
638637

examples/display_text_background_color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: MIT
33

44
"""
5-
This examples shows the use color and background_color
5+
This example shows the use color and background_color
66
"""
77
import time
88
import board

examples/display_text_background_color_padding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: MIT
33

44
"""
5-
This examples shows the use color and background_color
5+
This example shows the use color and background_color
66
"""
77
import time
88
import board

0 commit comments

Comments
 (0)