mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Make Tab Layout setting only accept predefined values (#3564)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
092f66dc15
commit
b2fa7b1d94
|
@ -53,6 +53,7 @@
|
|||
- Minor: Removed timestamp from AutoMod messages. (#3503)
|
||||
- Minor: Added ability to copy message ID with `Shift + Right Click`. (#3481)
|
||||
- Minor: Colorize the entire split header when focused. (#3379)
|
||||
- Minor: Make Tab Layout setting only accept predefined values (#3564)
|
||||
- Bugfix: Fix Split Input hotkeys not being available when input is hidden (#3362)
|
||||
- Bugfix: Fixed colored usernames sometimes not working. (#3170)
|
||||
- Bugfix: Restored ability to send duplicate `/me` messages. (#3166)
|
||||
|
|
|
@ -98,8 +98,8 @@ public:
|
|||
"/appearance/messages/usernameDisplayMode",
|
||||
UsernameDisplayMode::UsernameAndLocalizedName};
|
||||
|
||||
IntSetting tabDirection = {"/appearance/tabDirection",
|
||||
NotebookTabDirection::Horizontal};
|
||||
EnumSetting<NotebookTabDirection> tabDirection = {
|
||||
"/appearance/tabDirection", NotebookTabDirection::Horizontal};
|
||||
|
||||
// BoolSetting collapseLongMessages =
|
||||
// {"/appearance/messages/collapseLongMessages", false};
|
||||
|
|
|
@ -144,30 +144,34 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
|||
[](auto args) {
|
||||
return fuzzyToFloat(args.value, 1.f);
|
||||
});
|
||||
layout.addDropdown<int>(
|
||||
"Tab layout", {"Horizontal", "Vertical"}, s.tabDirection,
|
||||
[](auto val) {
|
||||
switch (val)
|
||||
{
|
||||
case NotebookTabDirection::Horizontal:
|
||||
return "Horizontal";
|
||||
case NotebookTabDirection::Vertical:
|
||||
return "Vertical";
|
||||
}
|
||||
ComboBox *tabDirectionDropdown =
|
||||
layout.addDropdown<std::underlying_type<NotebookTabDirection>::type>(
|
||||
"Tab layout", {"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;
|
||||
}
|
||||
});
|
||||
return "";
|
||||
},
|
||||
[](auto args) {
|
||||
if (args.value == "Vertical")
|
||||
{
|
||||
return NotebookTabDirection::Vertical;
|
||||
}
|
||||
else
|
||||
{
|
||||
// default to horizontal
|
||||
return NotebookTabDirection::Horizontal;
|
||||
}
|
||||
},
|
||||
false);
|
||||
tabDirectionDropdown->setMinimumWidth(
|
||||
tabDirectionDropdown->minimumSizeHint().width());
|
||||
|
||||
layout.addCheckbox("Show tab close button", s.showTabCloseButton);
|
||||
layout.addCheckbox("Always on top", s.windowTopMost);
|
||||
|
|
Loading…
Reference in a new issue