Skip to content

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

Closed
luke-jr wants to merge 1 commit into
bitcoinknots:28.x-knotsfrom
luke-jr:fix_qt_progressbar_fittext
Closed

luke-jr wants to merge 1 commit into
bitcoinknots:28.x-knotsfrom
luke-jr:fix_qt_progressbar_fittext

Conversation

@luke-jr

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

Copy link
Copy Markdown
Collaborator

No description provided.

@luke-jr luke-jr added the bug label May 15, 2025
Comment thread src/qt/bitcoingui.cpp

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

@ghost ghost May 17, 2025

Copy link
Copy Markdown

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
Copy Markdown
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

@luke-jr luke-jr added the merged label Aug 23, 2025
@luke-jr

luke-jr commented Aug 23, 2025

Copy link
Copy Markdown
Collaborator Author

Merged in upcoming Knots 29

@luke-jr luke-jr closed this Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant