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

Removed font size multiplier #3531

Merged
merged 3 commits into from
Nov 16, 2024
Merged

Conversation

dee
Copy link
Contributor

@dee dee commented Nov 13, 2024

On Windows, IDE fonts in a project tree, editor tabs etc are noticeably larger than a system font. That was because an IDE font was 20% bigger than a system one. Tested it on 4K and 1080p.

Comment on lines 385 to 388
#elif defined(__WXMSW__)
// wxMSW
float pointSize = f.GetFractionalPointSize() * 1.2;
float pointSize = f.GetFractionalPointSize();
f.SetFractionalPointSize(pointSize);
Copy link
Contributor

Choose a reason for hiding this comment

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

So whole __WXMSW__ block can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something like this, i guess.

Copy link
Contributor

Choose a reason for hiding this comment

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

No need to set same value for other, simply

wxFont clScrolledPanel::GetDefaultFont()
{
    wxFont f = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
#if defined(__WXMAC__)
    float pointSize = f.GetFractionalPointSize() * 1.2;
    f.SetFractionalPointSize(pointSize);
#endif
    return f;
}

or

wxFont clScrolledPanel::GetDefaultFont()
{
    wxFont f = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
#if defined(__WXMAC__)
    f.SetFractionalPointSize(1.2 * f.GetFractionalPointSize());
#endif
    return f;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, really, I am setting the same value back.

@dee
Copy link
Contributor Author

dee commented Nov 15, 2024

Thank you!

@dee dee closed this Nov 15, 2024
@Jarod42
Copy link
Contributor

Jarod42 commented Nov 15, 2024

Unsure why you close your PR.

Note that:

  • approving != merging.
  • I don't have write access, I'm just a contributor like you.

@dee
Copy link
Contributor Author

dee commented Nov 15, 2024

My bad, I thought it was finished.

@dee dee reopened this Nov 15, 2024
@eranif
Copy link
Owner

eranif commented Nov 16, 2024

Even though some CI are failing - these were fixed in master branch. Once the Ubuntu build is OK, I will merge it

@eranif eranif merged commit 6880e78 into eranif:master Nov 16, 2024
2 of 4 checks passed
@dee dee deleted the windows-font-size-patch branch November 20, 2024 11:56
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