Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Limit interface scale #1502

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

Merged
AlbyIanna merged 9 commits into main from limit-interface-scale
Oct 6, 2022
Merged

Limit interface scale #1502

AlbyIanna merged 9 commits into main from limit-interface-scale
Oct 6, 2022

Conversation

Copy link
Contributor

@AlbyIanna AlbyIanna commented Sep 26, 2022

Motivation

The interface scaling of the IDE doesn't handle scaling properly:

  • as stated in Application allows setting interface scaling interface past limits #1384 , it's possible to find yourself in unpredictable situations we're only limiting the scaling when using the stepper input
  • same thing happen with the editor font size
  • when changing the scaling really fast (e.g.: holding down CTRL/CMD + = for a while), the interface seems to 'bounce' from bigger to smaller and viceversa until it's stable

Change description

  • move the interface scaling logic to a separate contribution
  • the stepper in the settings dialog and the related commands now uses common values for min/max scale and font size
  • when the Automatic flag in the settings dialog is checked, enable/disable the 'Increase/Decrease Font Size' menu item and shortcuts when reaching -60% (min) and 280% (max)
  • when the Automatic flag in the settings dialog is unchecked, enable/disable the 'Increase/Decrease Font Size' menu item and shortcuts when reaching 8 (min) and 72 (max)

Other information

Since Theia doesn't support dynamic menu items, to achieve this I needed to dispose the menu items and re-register them, and then update the mainMenuManager manually, otherwise they wouldn't get updated as expected.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Copy link
Contributor

Do you plan to get rid of the local settings field? Is this PR still in progress? See here: #1502 (comment).

Copy link
Contributor Author

AlbyIanna commented Sep 29, 2022
edited
Loading

Do you plan to get rid of the local settings field? Is this PR still in progress? See here: #1502 (comment).

@kittaakos I've already got rid of currentScale because it wasn't necessary (see last commit). About currentSettings – as stated in this comment → #1502 (comment) – I can't remove it because it's not only a duplicate but it also serves as temporary value in order to make the debouncing work correctly (see how I update the settings here)

kittaakos reacted with thumbs up emoji

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

Thank you! I checked the code and left a few remarks.

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

I have noticed some inconsistency between the disabled/enabled state of the menu item and the current editor.fontSize value.

Decrease expected to be disabled here:

Screen Shot 2022年10月04日 at 09 07 56

Increase expected to be disabled here:

Screen Shot 2022年10月04日 at 09 06 00

Decrease expected to be enabled here:

Screen Shot 2022年10月04日 at 09 11 27

@per1234 per1234 linked an issue Oct 4, 2022 that may be closed by this pull request
3 tasks
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 4, 2022
Copy link
Contributor Author

I have noticed some inconsistency between the disabled/enabled state of the menu item and the current editor.fontSize value.

Thank you @kittaakos, I wasn't registering the menus properly after changing fontScalingEnabled. Fixed in this commit.

I also the menu items weren't updating when changing the autoScaleInterface setting, so I also fixed that in the last commit

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

I verified it fixes #1384

Thanks Alberto!

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

It's working great. Thank you!

@AlbyIanna AlbyIanna merged commit aa0807c into main Oct 6, 2022
@AlbyIanna AlbyIanna deleted the limit-interface-scale branch October 6, 2022 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 per1234 approved these changes

@davegarthsimpson davegarthsimpson Awaiting requested review from davegarthsimpson

+1 more reviewer

@kittaakos kittaakos kittaakos approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Application allows setting interface scaling interface past limits

AltStyle によって変換されたページ (->オリジナル) /