indicate nbx activation as with gatom #1749
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
activation indicator
this simply uses the border width to indicate whether an iemgui
[nbx]
is active or not, similar as the ordinary gatoms do it (which is nice as it doesn't clash with any color concepts)streamlined number shortening algorithm
at also uses the same float-shortening algorithm as the number gatom (so if the number is too big, it displays a trailing
>
rather than replacing the entire number with a+
improved fontwidth calculation
the new calculation uses the system fontspecs (as other objects/gatoms do), getting rid of the empty space on the right hand of the nbx.
for backwards compatibility, we make sure that the new width is not bigger than it used to be (so objects on GOPs will always be visible). this shouldn't be an issue with the default fonts, but might be one, if a weird non-standard font is used).
it's possible to force the old behaviour by setting the compat-level to
<0.53