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

Display node address in peer table with monospace font for clean alignment #261

Closed
wants to merge 1 commit into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Mar 28, 2021

0.21.0 on Debian 10 "Buster"

I think it would be nicer and clearer to the user if addresses that consist of a defined static amount of characters, like Onion addresses (16 characters long in v2 format, 56 characters long in v3 format) are displayed with each same visible length.

To achieve this, this PR changes the font of the peer table's node address column to a monospace font.

In the screenshot of how it is now, it leaves a feeling of uncertainty to me that the onion addresses are not displayed in the same length (for each type v2/v3):

bildschirmfoto

With this PR applied it looks like so, nicely clean aligned:

bildschirmfoto2

I took over this approach from src/qt/addresstablemodel.cpp lines 214-221, which as I understand causes in the payment tab the receivers address being displayed in monospace font, unlike the receiver's address label below that, so it seems there was also a demand for a fixed-length display of address.

@hebasto
Copy link
Member

hebasto commented Mar 28, 2021

This approach couldn't work on macOS, though didn't test yet.

@jarolrod
Copy link
Member

jarolrod commented Mar 29, 2021

The address for the peer will appear really small (edit: i guess its not too small) on macOS because of the os default monospace font

Screen Shot 2021-03-28 at 8 07 20 PM

You'd either have to detect #ifdef macOS and omit this from applying (not a good option) or use the now embedded monospace font (#79).

@ghost
Copy link
Author

ghost commented Mar 29, 2021

@jarolrod For me your macOS screenshot looks ok, no action needed imo.

use the now embedded monospace font (#79).

Would the solution be, to change
return GUIUtil::fixedPitchFont();
to
return GUIUtil::fixedPitchFont(true);
?
This is how it looks on Debian Buster with the embedded monospace font (fixedPitchFont(true)):
bildschirmfoto

If the embedded font should be used, and maybe that could also solve #131, I think it would be good if there would be a global boolean variable that indicates if embedded monospace font shall be used (not only in the overview tab).

@rebroad
Copy link
Contributor

rebroad commented Mar 29, 2021

concept NACK - I find the current font more readable, and no mention of the benefit in changing the font, other than "uncertainty", which I personally don't experience.

I do think it would be nice to be able to add extra columns (as shown in your screenshots), but I think ideally these could be optional, and the selections saved between runs.

@hebasto
Copy link
Member

hebasto commented Mar 29, 2021

@rebroad

I do think it would be nice to be able to add extra columns (as shown in your screenshots), but I think ideally these could be optional, and the selections saved between runs.

#256 ?

@ghost
Copy link
Author

ghost commented Mar 29, 2021

@rebroad the columns "Type" and "Network" are not in 0.21.0, they are in current master branch code, from which the screenshots (other than the very first) are.

Non-macOS users would not use embedded font, so it would look like in my second screenshot. The embedded font is only a question for macOS users. I was just curious how it looks like in Debian, and show it.

@hebasto
Copy link
Member

hebasto commented Mar 30, 2021

I think it would be good if there would be a global boolean variable that indicates if embedded monospace font shall be used (not only in the overview tab).

... and a gui configure option to allow users choose what they like to use (in Options -> Display tab).

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@luke-jr
Copy link
Member

luke-jr commented Jun 12, 2021

Normally network addresses aren't fixed-length, so weak NACK.

Copy link
Contributor

@shaavan shaavan left a comment

Choose a reason for hiding this comment

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

Concept 0 on this

Though I am able to understand how op is trying to approach this issue. I don’t think it is an optimal solution. Because the address is a large string of characters. And the size of an individual column is quite small in itself. So for such a small font size. A monospace font decreases the readability of the text by a lot.
Though the current choice of font is not perfect, it is still better than a monospace alternative. I think monospaced font would be good for tabular figures, but not so much for non-tabular figures.

@hebasto
Copy link
Member

hebasto commented Sep 13, 2021

Closing due to a long period of inactivity.

@hebasto hebasto closed this Sep 13, 2021
@bitcoin-core bitcoin-core locked as resolved and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants