Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix packaging #235

Merged
merged 3 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include pyefis/config *
recursive-include src/pyefis/config *
2 changes: 1 addition & 1 deletion src/pyefis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2.0.20"
__version__ = "2.0.21"

3 changes: 0 additions & 3 deletions src/pyefis/instruments/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def fit_to_mask(iwidth,iheight,mask,font,units_mask=None, units_ratio=0.8):
# IF needed, shrink until it fits
while ( (text_width + units_width > width) or text_height > height ) and font_size > 0.5:
font_size -= 0.2
print(f"too wide trying: {font_size} text_width:{text_width}, units_width:{units_width}, width:{width}")
text_font.setPointSizeF(font_size)
fm = QFontMetrics(text_font)
text_width = fm.tightBoundingRect(mask).width()
Expand All @@ -39,7 +38,6 @@ def fit_to_mask(iwidth,iheight,mask,font,units_mask=None, units_ratio=0.8):
# If needed, grow until it fills
while (text_width + units_width < width) and text_height < height:
font_size += 0.2
print(f"Not wide enough, trying {font_size} text_width:{text_width}, units_width:{units_width}, width:{width}")
text_font.setPointSizeF(font_size)
fm = QFontMetrics(text_font)
text_width = fm.tightBoundingRect(mask).width()
Expand All @@ -55,7 +53,6 @@ def fit_to_mask(iwidth,iheight,mask,font,units_mask=None, units_ratio=0.8):
# The above took care of the width, this addresses the height:
while (text_height >= height) and font_size > 0.5:
font_size -= 0.2
print(f"too high, trying {font_size} text_height:{text_height}, height:{height}")
text_font.setPointSizeF(font_size)
fm = QFontMetrics(text_font)
text_width = fm.tightBoundingRect(mask).width()
Expand Down
Loading