Skip to content

Bugfix: GUI: Expand progress bar minimum width as needed to ensure text fits #126

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

Open
wants to merge 1 commit into
base: 28.x-knots
Choose a base branch
from

Conversation

luke-jr
Copy link
Collaborator

@luke-jr luke-jr commented May 15, 2025

No description provided.

@luke-jr luke-jr added the bug label May 15, 2025
@@ -688,6 +688,10 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)

progressBarLabel->setVisible(true);
progressBar->setFormat(tr("%1 behind").arg(timeBehindText));
const auto min_width = GUIUtil::TextWidth(progressBar->fontMetrics(), progressBar->format() + "00");
Copy link

@pithosian pithosian May 17, 2025

Choose a reason for hiding this comment

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

Is the + "00" for padding (eg: a charwidth on either side), or something else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Padding, otherwise the text is touching the edges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants