Skip to content

Commit

Permalink
Add downloading image and modify progress window
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfFan committed Feb 15, 2024
1 parent 0901c19 commit 8125f66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Download from [releases](https://github.com/ProfFan/Snap2LaTeX/releases).

Run the application.

The application will start downloading the model. It will take a few minutes.

![](./images/downloading.png)

There will be an icon in the system tray.

![](./images/dock-icon.png)
Expand Down
Binary file added images/downloading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions standalone_app/Snap2LaTeX.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import multiprocessing as mp


class StdoutQueue(Queue):
def __init__(self, maxsize=-1, block=True, timeout=None):
self.block = block
Expand Down Expand Up @@ -54,6 +55,9 @@ def app_show_progress(model_name):
progress.setWindowModality(Qt.WindowModality.WindowModal)
# disable the cancel button
progress.setCancelButton(None)
progress.setWindowFlags(
Qt.WindowType.CustomizeWindowHint | Qt.WindowType.WindowTitleHint
)

while load_process.is_alive():
while not q.empty():
Expand All @@ -74,6 +78,7 @@ def app_show_progress(model_name):
app.quit()
print("Model check complete.")


if __name__ == "__main__":
mp.freeze_support()

Expand Down

0 comments on commit 8125f66

Please sign in to comment.