Skip to content

Zoom and pan: More options in the settings and improved error output#11189

Merged
AUTOMATIC1111 merged 4 commits into
AUTOMATIC1111:release_candidatefrom
daswer123:dev
Jun 27, 2023
Merged

Zoom and pan: More options in the settings and improved error output#11189
AUTOMATIC1111 merged 4 commits into
AUTOMATIC1111:release_candidatefrom
daswer123:dev

Conversation

@daswer123

Copy link
Copy Markdown
Collaborator

Description

Thanks to @w-e-w for the suggested improvements in the code.

  1. Improved the error output, now they will accurately identify the problem.

  2. Made Zoom and Adjust brush size optional, as there are certain details.

  3. You can select one of the 3 buttons "Alt", "Shift", "Ctrl" for Zoom and Adjust brush size

  4. Added small tips in the description of the hotkeys, which will help get rid of possible problems

  5. Removed canvas_swap_controls, it is no longer needed

Screenshots/videos:

New Options:
image

Full settings menu
image

Accurate error messages

image

Checklist:

if (
(!isSpecialKey && !usedSingleKeys.has(hotkey)) ||
(isSpecialKey && !usedSpecialKeys.has(hotkey))
) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It can be simpler of the 'if()'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I'll fix the code and make it more compact in the coming days, for now it just works.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Corrected, removed this piece of code and made it smaller and clearer

@daswer123

Copy link
Copy Markdown
Collaborator Author

UPD.

Slightly changed the approach, now you can push off any extension function of your choice. Removed unnecessary code and changed tooltip class to avoid conflicts in future.

image

image

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from dev to release_candidate June 27, 2023 05:34
@AUTOMATIC1111 AUTOMATIC1111 merged commit dbc88c9 into AUTOMATIC1111:release_candidate Jun 27, 2023
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.

3 participants