generated from sindresorhus/electron-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 136
GUI Refactor #325
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
Draft
cangzhang
wants to merge
57
commits into
main
Choose a base branch
from
slint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
GUI Refactor #325
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Changed rune image fields in `UiBufferRune` to store file paths instead of pixel buffers. - Implemented logic to create a temporary directory for storing rune images. - Updated image fetching to save images to the temporary directory and load them from there. - Removed commented-out code related to displaying the third rune image in the UI.
- Updated `Cargo.lock` and `Cargo.toml` to use the latest dependencies, including `slint` and various other packages. - Introduced a new `current_champion_runes` structure to manage and store runes associated with the currently selected champion. - Enhanced the UI in `app.slint` to include a `ListView` for displaying runes, allowing users to apply runes directly from the interface. - Modified the main application logic to handle rune selection and application, improving user experience. - Changed the service URL in `web.rs` for fetching data, ensuring connectivity to the correct endpoint.
- Updated the rune application logic to use an asynchronous approach, allowing for better performance and responsiveness. - Enhanced error logging for the rune application process to capture and report any issues encountered during execution. - Refactored the closure for applying runes to improve clarity and maintainability.
- Commented out the "Random Champion Mode" button for future consideration. - Enhanced the layout of the rune display in the ListView by adding borders and adjusting alignment. - Organized the structure of the rune information display, including name, position, and images, for better visual clarity. - Ensured consistent styling and spacing for a more polished user interface.
- Introduced asynchronous tasks for fetching rune images to improve performance and responsiveness. - Added a mechanism to avoid duplicate processing of perk IDs using a HashSet. - Enhanced error handling during image fetching to log failures appropriately. - Ensured all fetch tasks complete before proceeding with further processing.
- Simplified the construction of the `rune_ids` vector for better readability. - Removed unnecessary array initialization and streamlined the logic for selecting the champion ID. - Enhanced clarity in the handling of the random champion mode by reducing nested conditions. - Improved overall code maintainability and readability in the main function.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.