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

Implement components with CustomTkinter UI-library based on Tkinter #31

Merged
merged 38 commits into from
Sep 13, 2024

Conversation

yuqisun
Copy link
Collaborator

@yuqisun yuqisun commented Aug 28, 2024

Added a new file [launchUI_custom.py] with CustomTkinter UI style.
Docker Image: yuqisun/cgra-flow-win

yuqisun and others added 30 commits July 20, 2024 14:59
…al units' and 'Tile x crossbar outgoing links'
…tween 'Tile x functional units' and 'Tile x crossbar outgoing links' - link with commit [5da7c1d]
TODO fix: kernelNameMenu
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This serves as a standalone GUI or we wanna merge this into existing one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

standalone

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just merge them two into one? By default, it launches as the light mode.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need keep both tkinter and customtkinter version?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the two be merged? We definitely don't want those click function or other functions be duplicated in two files. Can the customtkinter show the original light mode version?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, til, light mode != classic mode. We do want to keep our classic mode. Can we support 3 modes? Or the customtkinter cannot be co-exist with classic mode? This may require wrap some function with tkinter/customtkinter component as argument/parameter? Can you estimate the engineering effort and the ETA?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! You were talking about the original UI. Didn't consider for the coexistence of the two modes. They not only have different components, but also different methods and layouts. Can we do this by keeping both files and use parameters to control which mode to start?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different methods and layouts that are related to the tkinter/customtkinter, but the CGRA-related actions are always the same. Instead of keeping two files with many duplicated stuff, can we wrap the CGRA-related actions into another .py file? Then you can keep two tkinter-related .py files, serving like coarse-grained wrapper. WDYT?

Copy link
Collaborator Author

@yuqisun yuqisun Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried several common methods and encountered several problems:

  1. Many components are stored through widgets dict or accessed through global variables, and extracting methods requires significant code changes

  2. Different methods need to be used according to the different libraries, and the code will be more complex. For example, using config in tkinter and configure in customtkinter; Use testProgress ['value '] in tkinter and testProgress. set (x) in customtkinter

My question is, do these two modes need to coexist for a long time? If not, we can temporarily tolerate the situation of redundant code. And provide a parameter that allows users to select mode at startup.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, we will deprecate the classic mode soon or later.

README.md Outdated
root@2cd33efd97b3 WORK_REPO# export DISPLAY=192.168.3.38:0.0 # change to your own ipv4 address with 0.0
root@2cd33efd97b3 WORK_REPO# source venv/bin/activate
(venv) root@2cd33efd97b3 WORK_REPO# cd CGRA-Flow/
(venv) root@2cd33efd97b3 CGRA-Flow# python launchUI_custom.py
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be mkdir build, then cd, then launch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, let me update this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@tancheng
Copy link
Owner

LGTM, please submit another PR to pop up a dialogue for user to choose between dark and light.

@tancheng tancheng merged commit 830d0f7 into tancheng:master Sep 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants