Vertical tabs (#1815)

* Vertical tabs

* Vertical tab wrapping

* Fix formatting

* Cleanup code

* Updated changelog

* Hide button row if no buttons exist

* Fix tab width expansion

Co-authored-by: fourtf <tf.four@gmail.com>
This commit is contained in:
Daniel
2020-08-13 09:43:08 -04:00
committed by GitHub
parent b52d15b9b4
commit 0e6ca6b097
10 changed files with 278 additions and 77 deletions
+25
View File
@@ -299,6 +299,31 @@ void GeneralPage::initLayout(SettingsLayout &layout)
return QString::number(val) + "x";
},
[](auto args) { return fuzzyToFloat(args.value, 1.f); });
layout.addDropdown<int>(
"Tab direction", {"Horizontal", "Vertical"}, s.tabDirection,
[](auto val) {
switch (val)
{
case NotebookTabDirection::Horizontal:
return "Horizontal";
case NotebookTabDirection::Vertical:
return "Vertical";
}
return "";
},
[](auto args) {
if (args.value == "Vertical")
{
return NotebookTabDirection::Vertical;
}
else
{
// default to horizontal
return NotebookTabDirection::Horizontal;
}
});
layout.addCheckbox("Show tab close button", s.showTabCloseButton);
layout.addCheckbox("Always on top", s.windowTopMost);
#ifdef USEWINSDK