diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 0689adea522..71cfacbb402 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -250,12 +250,8 @@ void GeneralSettingsWidget::fillLanguageBox() const void GeneralSettingsWidget::apply() { - bool showRestart = generalSettings().provideSplitterCursors.volatileValue() - != generalSettings().provideSplitterCursors.value(); generalSettings().apply(); generalSettings().writeSettings(); - if (showRestart) - ICore::askForRestart(Tr::tr("The cursors for resizing views will change after restart.")); int currentIndex = m_languageBox->currentIndex(); setLanguage(m_languageBox->itemData(currentIndex, Qt::UserRole).toString()); diff --git a/src/plugins/coreplugin/minisplitter.cpp b/src/plugins/coreplugin/minisplitter.cpp index 8fdec456b0b..dd2aa280e1f 100644 --- a/src/plugins/coreplugin/minisplitter.cpp +++ b/src/plugins/coreplugin/minisplitter.cpp @@ -90,10 +90,9 @@ public: { setMask(QRegion(contentsRect())); setAttribute(Qt::WA_MouseNoMask, true); - if (generalSettings().provideSplitterCursors()) - setCursor(orientation == Qt::Horizontal ? hsplitCursor() : vsplitCursor()); } protected: + bool event(QEvent *event) override; void resizeEvent(QResizeEvent *event) override; void paintEvent(QPaintEvent *event) override; @@ -107,6 +106,17 @@ private: using namespace Core; using namespace Core::Internal; +bool MiniSplitterHandle::event(QEvent *event) +{ + if (generalSettings().provideSplitterCursors()) { + if (event->type() == QEvent::HoverEnter) + setCursor(orientation() == Qt::Horizontal ? hsplitCursor() : vsplitCursor()); + else if (event->type() == QEvent::HoverLeave) + unsetCursor(); + } + return QSplitterHandle::event(event); +} + void MiniSplitterHandle::resizeEvent(QResizeEvent *event) { if (orientation() == Qt::Horizontal)