Skip to content

Commit

Permalink
bigger font if no banner
Browse files Browse the repository at this point in the history
  • Loading branch information
coinish committed Dec 30, 2023
1 parent 46ebe9b commit 1d726ae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions weatherDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,6 @@ def setup_canvas(w,h, forecast_background, bg_file, bg_map, zoom, lon, lat):
img= resize_fill(img, w, h)




elif bg_map:
#load map image
img= load_map(lat, lon)
Expand Down Expand Up @@ -781,21 +779,24 @@ def main(forecast_elements,
# messages at top of screen: banner, location_banner, forecast time

top_line= 0

# banner
if banner:
img= write_in_box(img, 0, 0, w, 40, banner, 20, summary_font_loader(20), fill= (0, 0, 0, 255), spacing= 0, align_x= "center", align_y= "top")
top_line+= 25

# location_banner
if location_banner:
img= write_in_box(img, 0, top_line, w, 40+top_line, location_banner, 20, summary_font_loader(20), fill= (0, 0, 0, 255), spacing= 0, align_x= "center", align_y= "top")
top_line+= 25

# forecast time
img= write_in_box(img, 0, top_line, w, 40+ top_line, forecast_elements["local_now"], 20, summary_font_loader(20), fill= (0, 0, 0, 255), spacing= 0, align_x= "center", align_y= "top")
img= write_in_box(img, 0, top_line, w, 40+ top_line, forecast_elements["local_now"], 70-top_line, summary_font_loader(70-top_line), fill= (0, 0, 0, 255), spacing= 0, align_x= "center", align_y= "top")




# temperature in centre of screen

#current temperature
x0, y0, x1, y1= text_box2(img, 0, 0, w, h- 90, forecast_elements["temperature_msg"], int(110), temperature_font_loader(int(110)),
fill= (255, 255, 0, 255), spacing= 0, align_x= "center", align_y= "center")
Expand Down

0 comments on commit 1d726ae

Please sign in to comment.