Closed BsNoSi closed 3 days ago
That would only work (approximately) when you use a mono-typed font. If you don't, then every character has a different width. That "custom size" is only a calculation on the width of one average character.
Sure, it is the average width of a character (m or what ever).
This average width changes with zoom. But the editor width is defined with the average of current zoom and then fixed. Therefore, zooming does not match the average width of the given char count anymore.
To give an extreme example: The average of a character with pixel height of 80 is another than with a pixel height of 20 pixels.
Keeping the line length to the average char count width regardless to the font size would help to estimate the reading/printing length of an article.
Meanwhile, I can help myself, open “custom” after zooming and press OK
which “fixes” it.
To be honest, it is probably only a question of expectation. I expected “keep average char count per line”, which is not fulfilled. If you define it as “average width of current font size”, then that is, what it is.
When I zoom in distraction free mode, the margin changes for me.
Where did you test the zooming? Did you mention all steps in Steps to reproduce
?
Maybe this video helps:
https://github.com/user-attachments/assets/fc30ab85-ec92-426a-9ee4-93161f4113eb
Can you please run QOwnNotes in a new session (see cli-parameters) and then describe step by step what you did to get to that screen?
Sure.
The application starts in German, I have added comments to clarify what is happening.
https://github.com/user-attachments/assets/eeb8e054-b58d-4601-9fd1-0b832bbf73e1
Summary of the video: Zooming with the mouse wheel breaks down the set →number of characters← of the editor width.
F11 → same behavior: The editor is set with the current character width, but the margins are not adjusted to the set number of characters when the font size is changed by increasing/decreasing zoom.
I see, so you forgot to mention that you also need to toggle a setting, now we are getting somewhere. 😉
😞 I mentioned it myself, producing the second video. I apologize. In distraction free mode it behaves identical (in my case).
There now is a new release, could you please test it and report if it works for you?
👍👍👍 New 24.11.1 fulfills perfectly the very useful fixation of lines to an average line length, regardless to zoom in or out. !TNX!.
Great, thank you for testing!
I think I had less effort with testing.😉 🙏
I think it took longer to find out what you were exactly talking about than to fix it. 😆
It is always difficult to recognize what (supposedly obvious) side information the other side needs in order to view something from the same perspective. Especially with software, that has only been in use for a few days, and therefore the deeper understanding for it is still missing.
Expected behaviour
Userdefined setting of 64 chars should keep this with by count of chars.
Actual behaviour
Setting userdefined width takes the current font width to set margins. Zooming actions (larger, smaler size) are limited to this widh in pixels instead "width in char".
Steps to reproduce
Menu → Window → Editor width → Custom
set amount of characters → ok
Zoom in/out. Instead of fixed char per line the line with is fixed to size of 64 chars at time of definition in pixels.
Relevant log output in the Log panel
Expand
``` [11:49:41] [debug] updatePanelMenu - 'updatePanelMenu' ```Information about the application, settings and environment
Expand
QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Di Nov 5 11:49:44 2024` **Version**: `24.11.0` **Build date**: `Nov 3 2024` **Build number**: `1137` **Platform**: `windows (windows)` **Operating System**: `Windows 10 Version 2009` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `GitHub Actions` **Qt Version (build)**: `5.15.2` **Qt Version (runtime)**: `5.15.2` **Portable mode**: `no` **Settings path / key**: `\HKEY_CURRENT_USER\Software\PBE\QOwnNotes` **Application database path**: `C:\Users\xxxxxx\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite` **Application arguments**: `C:\Tools\QOwnNotes\QOwnNotes.exe` **Qt Debug**: `0` **Locale (system)**: `de_DE` **Locale (interface)**: *empty* **Primary screen resolution**: `3840x2160` **Icon theme**: `breeze-dark-qownnotes` **Notes in current note folder**: `447` **Calendar items**: `4` **Enabled scripts**: `3` **Database drivers**: `QSQLITE, QODBC, QODBC3, QPSQL, QPSQL7` ## Server Info **serverUrl**: `https://nc.nosi.de` **appIsValid**: `yes` **notesPathExists**: `yes` **serverVersion**: `30.0.1.2` **appVersion**: *empty* ## Spellchecking **Enabled**: `false` **Selected language**: `auto` **Language codes**: `de_DE_frami, en_GB` **Language names**: `Deutsch (Deutschland), British English (United Kingdom)` **Application dictionaries path**: `C:\Users\xxxxxx\AppData\Roaming\PBE\QOwnNotes\dicts` ## Note folders **currentNoteFolderId**: `1` ### Note folder `Notizen` **id**: `1` **isCurrent**: `yes` **activeTagId**: `-1` **localPath**: `C:\Tools\Notizen` **remotePath**: `Notes` **cloudConnectionId**: `1` **isShowSubfolders**: `yes` **isUseGit**: `no` **allowDifferentNoteFileName**: `no` **activeNoteSubFolder name**: `Artikel` **database file**: `C:\Tools\Notizen\notes.sqlite` ## Cloud connections ### Cloud connection `Standard` **id**: `1` **isCurrent**: `yes` **serverUrl**: `https://nc.nosi.de` **username**: `NoSi` **accountId**: *empty* ## Enabled scripts ### Script `Markdown-it markdown parser` **id**: `1` **path**: `C:\Users\xxxxxx\AppData\Roaming\PBE\QOwnNotes\scripts\markdown-it\markdown-it.qml` **variablesJson**: ``` { "customStylesheet": "", "options": "{\n html: true, // Enable HTML tags in source\n //xhtmlOut: false, // Use '/' to close single tags ()\n breaks: true, // Convert '\\n' in paragraphs into
\n //langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: true, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: true,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n //quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with