From f8c42918a6ac611cc59629968deff96acf8e8e13 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 25 Aug 2018 20:49:50 +0300 Subject: [PATCH] Added option to turn off link info tooltips. --- src/singletons/Settings.hpp | 1 + src/widgets/helper/ChannelView.cpp | 2 ++ src/widgets/settingspages/FeelPage.cpp | 3 +++ 3 files changed, 6 insertions(+) diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 472c2892a..ff9a87222 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -109,6 +109,7 @@ public: /// Links BoolSetting linksDoubleClickOnly = {"/links/doubleClickToOpen", false}; + BoolSetting enableLinkInfoTooltip = {"/links/linkInfoTooltip", false}; BoolSetting enableLowercaseLink = {"/links/linkLowercase", true}; /// Ingored Users diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index 71c1408d7..d714884ae 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -864,6 +864,8 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event) if (tooltip.isEmpty()) { tooltipWidget->hide(); + } else if (hoverLayoutElement->getLink().isValid() && !getSettings()->enableLinkInfoTooltip) { + tooltipWidget->hide(); } else { tooltipWidget->moveTo(this, event->globalPos()); tooltipWidget->setWordWrap(hoverLayoutElement->getLink().isValid()); diff --git a/src/widgets/settingspages/FeelPage.cpp b/src/widgets/settingspages/FeelPage.cpp index 78b41c45d..b87a2d098 100644 --- a/src/widgets/settingspages/FeelPage.cpp +++ b/src/widgets/settingspages/FeelPage.cpp @@ -50,6 +50,9 @@ FeelPage::FeelPage() form->addRow("Links:", this->createCheckBox("Open links only on double click", getSettings()->linksDoubleClickOnly)); + form->addRow("", + this->createCheckBox("Show link info in tooltips", + getSettings()->enableLinkInfoTooltip)); } layout->addSpacing(16);