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

Enable users to configure their monospace font specifically #497

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Dec 3, 2021

This replaces the overly-verbose radio-button font setting (which only allows embedded or autodetected from system) with a simple combobox providing both existing options as well as a custom option to allow the user to select any font of their choice/style.

@jarolrod jarolrod added Feature UX All about "how to get things done" labels Dec 3, 2021
Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

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

Concept ACK, a follow-up can be to use the selected font wherever monospace fonts are used such as the console.

@luke-jr
Copy link
Member Author

luke-jr commented Dec 3, 2021

a follow-up can be to use the selected font wherever monospace fonts are used such as the console.

A separate configuration for that may make sense , but yes, this makes it much simpler to do that. Figured it would be a bit too much for this PR though :)

@RandyMcMillan
Copy link
Contributor

Concept ACK

This should allow users to select a dyslexic font as well (if they have it installed) - which can be helpful when dealing with numbers.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Concept ACK.

#include <QIntValidator>
#include <QLocale>
#include <QMessageBox>
#include <QSettings>
#include <QSystemTrayIcon>
#include <QTimer>

int setFontChoice(QComboBox* cb, const OptionsModel::FontChoice& fc)
Copy link
Contributor

Choose a reason for hiding this comment

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

move under anonymous namespace?

src/qt/optionsdialog.cpp Show resolved Hide resolved
src/qt/optionsdialog.cpp Show resolved Hide resolved
@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 30, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK pablomartin4btc, hebasto
Concept ACK jarolrod, promag, RandyMcMillan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

@hebasto
Copy link
Member

hebasto commented Apr 13, 2022

@luke-jr still working on this?

@luke-jr
Copy link
Member Author

luke-jr commented Apr 13, 2022

@hebasto Yes, but I don't understand the review comment.

@RandyMcMillan
Copy link
Contributor

@hebasto
Copy link
Member

hebasto commented Oct 26, 2022

@luke-jr Rebase?

@luke-jr
Copy link
Member Author

luke-jr commented Dec 6, 2022

Rebased

@hebasto
Copy link
Member

hebasto commented Dec 7, 2022

Approach ACK. Tested on Windows 11. Observing kind of jittering of the vertical position of the "Font in the Overview tab:" label when choosing different fonts. Could it be avoided?

@luke-jr
Copy link
Member Author

luke-jr commented Dec 8, 2022

I'm guessing it's the preview font changing? How would you suggest avoiding it?

@hebasto
Copy link
Member

hebasto commented Apr 17, 2023

Closing this due to lack of activity. Feel free to reopen.

@hebasto hebasto closed this Apr 17, 2023
@luke-jr
Copy link
Member Author

luke-jr commented Jul 21, 2023

Rebased

Copy link
Contributor

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

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

tested ACK a17fd33

Current UI without this PR:

image

With this PR:

image

The label is moving vertically with some font selection as @hebasto pointed it out and even the window gets resized sometimes.

Perhaps to avoid it, we could just leave the view as we have it today but instead of a radio button we fit the combo box in there so there's enough space for the text preview.

In the dialog that's shown once we click on "custom...", shouldn't we filter by "monospace" font types only? @RandyMcMillan, I'm not sure if this could be an issue, however I checked that some dyslexic fonts that are non-monospaced (eg OpenDyslexic) have monospaced versions as well.

And perhaps limit the size?

image

When reviewing the commit messages, except for the 3rd one (3a6757e), please take into account the title's length compared to the recommendation in our guidelines (eg GUI: Move "embedded font or not" decision into new OptionsModel::getFontForMoney method) perhaps when the title doesn't fit you can shorten them with the intention and add both technical and code-specific details in the commit body?

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 5, 2024

🤔 There hasn't been much activity lately and the CI seems to be failing.

If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK a17fd33, I have reviewed the code and tested it on Ubuntu 22.04. This is a UX improvement. #497 (comment) might be addressed in a follow-up.

@hebasto hebasto merged commit 60ac503 into bitcoin-core:master Feb 7, 2024
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI failed Feature UX All about "how to get things done"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants