NotepadNext
NotepadNext copied to clipboard
[UI] Status bar eolFormat StatusLabel needs to be wider

https://github.com/dail8859/NotepadNext/blob/6888d4b9fb7544a5ba9ce06228ba603f37e06e5d/src/NotepadNext/widgets/EditorInfoStatusBar.cpp#L38
Maybe 120?
- eolFormat = new StatusLabel(100);
+ eolFormat = new StatusLabel(120);

Do you happen to know what font that is using for the UI (looks like a mono-spaced font which will definitely take up much more room)? What OS are you using?
On Windows I'm assuming it defaults to some flavor of Segoe UI which fits fine.

It might be better to dynamically calculate an appropriate width for that section (and maybe other sections) of the status bar based on the font being used.
Even your selection information has barely enough information, whereas on my screenshot there's plenty of room.
qInfo("rawName: %s", qUtf8Printable(app.font().rawName()));
qInfo("family: %s", qUtf8Printable(app.font().family()));
qInfo("defaultFamily: %s", qUtf8Printable(app.font().defaultFamily()));
qInfo("styleName: %s", qUtf8Printable(app.font().styleName()));
qInfo("toString: %s", qUtf8Printable(app.font().toString()));
[ 0.174] I: rawName: unknown
[ 0.174] I: family: SimSun
[ 0.939] W: Unable to enumerate family ' "Ubuntu Mono derivative Powerline" '
[ 1.057] I: defaultFamily: SimSun
[ 1.057] I: styleName:
[ 1.057] I: toString: SimSun,9,-1,5,50,0,0,0,0,0
So, maybe SimSun @ 10pt

I'am using Windows 10.
Thanks for that additional info!
I'am using Windows 10.
Interesting. Any idea why it is using a non-standard font? Did you change the default Font in Windows? If so this will give me a way to reproduce the issue.
Any idea why it is using a non-standard font? Did you change the default Font in Windows?
I'm not sure. My system language setting is Simplified Chinese (zh-CN), may be related to this. I guess you can simulate this by manually specifying QT's font settings: QFont Class | Qt GUI 5.15.9
Some additional information:
I'm not quite sure of the exact definition of the default font.
But noMeiryoUI tells me that my global default font is: Microsoft YaHei UI 9pt.
It looks like QT will read the system settings if the default font is not set.
Thanks for the info.
My system language setting is Simplified Chinese (zh-CN), may be related to this.
Yeah possibly. Windows might try to select a better font for other languages.
I guess you can simulate this by manually specifying QT's font settings
Agreed this is probably the best way to test it instead of trying to mess around with Windows settings. Really all that's needed is to force a different default font.
Maybe this issue has been fixed since v0.6? I'd like to close this.

Maybe this issue has been fixed since v0.6?
Great to hear! Most likely the upgrade to Qt6 fixed the issue for us :)