From f362548e285504253cabef5486c5f679784e38d7 Mon Sep 17 00:00:00 2001 From: rexim Date: Wed, 12 Jun 2019 02:05:18 +0700 Subject: [PATCH] (#976) Use int for emotesTooltipPreview --- src/singletons/Settings.hpp | 2 +- src/widgets/settingspages/GeneralPage.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 63f5f4f4c..e4b30de67 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -192,7 +192,7 @@ public: QStringSetting currentVersion = {"/misc/currentVersion", ""}; BoolSetting loadTwitchMessageHistoryOnConnect = { "/misc/twitch/loadMessageHistoryOnConnect", true}; - BoolSetting emotesTooltipPreview = {"/misc/emotesTooltipPreview", false}; + IntSetting emotesTooltipPreview = {"/misc/emotesTooltipPreview", 0}; QStringSetting cachePath = {"/cache/path", ""}; diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 9cf81a154..914f9eb70 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -270,7 +270,12 @@ void GeneralPage::initLayout(SettingsLayout &layout) layout.addCheckbox("Double click links to open", s.linksDoubleClickOnly); layout.addCheckbox("Unshorten links", s.unshortLinks); layout.addCheckbox("Show live indicator in tabs", s.showTabLive); - layout.addCheckbox("Show emote preview in tooltip on hover", s.emotesTooltipPreview); + layout.addDropdown( + "Show emote preview in tooltip on hover", + {"Don't show", "Always show"}, + s.emotesTooltipPreview, + [](int index) { return index; }, + [](auto args) { return args.index; }); layout.addSpacing(16); layout.addSeperator();