Add setting for username display style (#2891)

This commit is contained in:
Mm2PL
2021-06-13 12:13:19 +00:00
committed by GitHub
parent 91b0170241
commit eb8ddfc1d3
5 changed files with 23 additions and 11 deletions
+8
View File
@@ -52,6 +52,11 @@ private:
ConcurrentSettings &getCSettings();
enum UsernameDisplayMode : int {
Username = 1, // Username
LocalizedName = 2, // Localized name
UsernameAndLocalizedName = 3, // Username (Localized name)
};
/// Settings which are availlable for reading and writing on the gui thread.
// These settings are still accessed concurrently in the code but it is bad practice.
class Settings : public ABSettings, public ConcurrentSettings
@@ -88,6 +93,9 @@ public:
"/appearance/messages/hideDeletionActions", false};
BoolSetting colorizeNicknames = {"/appearance/messages/colorizeNicknames",
true};
EnumSetting<UsernameDisplayMode> usernameDisplayMode = {
"/appearance/messages/usernameDisplayMode",
UsernameDisplayMode::UsernameAndLocalizedName};
IntSetting tabDirection = {"/appearance/tabDirection",
NotebookTabDirection::Horizontal};