Adding preference to enable vertical layout mode #1872#1902
Adding preference to enable vertical layout mode #1872#1902glushchenko merged 2 commits intoglushchenko:masterfrom
Conversation
|
It looks definitely good, I'll try to test it, and if everything goes well, we'll release it in the next update. |
|
After restarting, in the case of vertical orientation, you need to restore the width of the list of notes and the height of a single note so that one preview line is visible. That is, in the same position in which the program was after installation. And if you switch to horizontal mode, it should look like the screenshot. |
- Changed preference label to "Arrange note list above editor (applies after quit)" - When user changes horizontalOrientation, reset note list width/height to default - When changing to horizontalOrientation=true, set note list cell height to 0 - When changing to horizontalOrientation=false, reset note list cell height to default
Thanks, I really appreciate it! Before getting into the below details, I wanted to make sure I'm on the same page as you on the horizontal vs vertical terminology. Here's what I wrote in the issue #1872 thread:
To just avoid the ambiguous horizontal/vertical terminology altogether, I changed the preference label to "Arrange note list above editor (applies after quit)". Does that sound good to you? Here's what that preference looks like now:
I'm assuming here by "vertical orientation" you mean horizontalOrientation = false and NSSplitView.isVertical = true (side-by-side). So I understand this to mean that when the user switches to horizontalOrientation = false, it should set the cellSpacing to 33 (the default value in UserDefaultsManagement). I've made it just set the preference value but not actually call setTableRowHeight, so this change won't appear until the user restarts the app. And you also want to set the note list width to the default. This was a little trickier. At first I thought it was the notesTableWidth preference, but it looks like that's only used when doing toggleNoteList. Otherwise it's using splitView.autosaveName "EditorSplitView" so that the system automatically saves the divider position. It turns out this is saved in a UserDefault key "NSSplitView Subview Frames EditorSplitView". So my approach here was to simply remove that, so that it would fall back to the default. Here's what the window looks like after switching to horizontalOrientation = false and restarting the app:
I take this to mean that when you switch to horizontalOrientation = true (top-to-bottom), it should set the note list spacing to 0. And also that it should set a reasonable note list height – for that I tried just removing the "NSSplitView Subview Frames EditorSplitView" preference in this case as well, and that seemed to work well. Here's what the window looks like after switching to horizontalOrientation = true and restarting the app:
|



Adding "Vertical Layout (applies after quit)" checkbox to the Layout preferences, to switch to a layout with the note list above the note editor.

