mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-22 11:00:16 +10:00
Changes
This commit is contained in:
@@ -50,7 +50,7 @@ class DownloadFrame(wx.Frame):
|
||||
title_label.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
|
||||
title_label.Centre(wx.HORIZONTAL)
|
||||
|
||||
progress_bar = wx.Gauge(frame, range=100, pos=(-1, title_label.GetPosition()[1] + title_label.GetSize()[1] + 5), size=(300, 20))
|
||||
progress_bar = wx.Gauge(frame, range=100, pos=(-1, title_label.GetPosition()[1] + title_label.GetSize()[1] + 5), size=(300, 20), style=wx.GA_SMOOTH|wx.GA_PROGRESS)
|
||||
progress_bar.Centre(wx.HORIZONTAL)
|
||||
|
||||
label_amount = wx.StaticText(frame, label="Preparing download", pos=(-1, progress_bar.GetPosition()[1] + progress_bar.GetSize()[1]))
|
||||
@@ -68,7 +68,11 @@ class DownloadFrame(wx.Frame):
|
||||
self.download_obj.download()
|
||||
while self.download_obj.is_active():
|
||||
|
||||
percentage: int = self.download_obj.get_percent()
|
||||
percentage: int = round(self.download_obj.get_percent())
|
||||
if percentage == 0:
|
||||
percentage = 1
|
||||
|
||||
logging.info(f"Download progress: {percentage}%")
|
||||
|
||||
if percentage == -1:
|
||||
amount_str = f"{utilities.human_fmt(self.download_obj.downloaded_file_size)} downloaded ({utilities.human_fmt(self.download_obj.get_speed())}/s)"
|
||||
|
||||
@@ -402,6 +402,7 @@ class MainFrame(wx.Frame):
|
||||
sizer.Add(buttonsizer, 0, wx.ALIGN_RIGHT | wx.ALL, 20)
|
||||
panel.SetSizer(sizer)
|
||||
frame.Show()
|
||||
frame.Centre()
|
||||
|
||||
def _onWebviewNav(self, event):
|
||||
url = event.GetURL()
|
||||
|
||||
Reference in New Issue
Block a user