Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hishizuka committed Jun 24, 2024
1 parent 720c837 commit 70b0981
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 6 additions & 3 deletions modules/pyqt/menu/pyqt_course_menu_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,16 @@ def draw_images(self, draw_map_image=True, draw_profile_image=True):

return True

def set_font_size(self):
self.font_size = int(min(self.size().width(), self.size().height()) / 10)
def set_font_size(self, init=False):
if init:
self.font_size = int(min(self.config.display.resolution) / 10)
else:
self.font_size = int(min(self.size().width(), self.size().height()) / 10)

def resizeEvent(self, event):
self.check_all_image_and_draw()

self.set_font_size()
self.set_font_size(event.oldSize() == QtCore.QSize(-1, -1))
for i in [self.distance_item, self.ascent_item]:
i.update_font_size(self.font_size)

Expand Down
7 changes: 4 additions & 3 deletions modules/utils/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ def datetime_myparser(ts):
int(ts[12:14]), # %s
)
return dt
elif 24 <= len(ts) <= 26:
# 2019-03-22T23:24:14.280604 / 26 chars
# 2019-09-30T12:44:55.000Z / 24 chars
elif 24 <= len(ts) <= 26 or len(ts) == 32:
# 2019-03-22T23:24:14.280604 / 26 chars
# 2019-09-30T12:44:55.000Z / 24 chars
# 2024-06-24 00:58:54.801928+00:00 / 32 chars
dt = datetime(
int(ts[0:4]), # %Y
int(ts[5:7]), # %m
Expand Down

0 comments on commit 70b0981

Please sign in to comment.