mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
QT >= 5.8 stop ride summary stealing focus
.. its annoying!
This commit is contained in:
@@ -144,6 +144,10 @@ LTMWindow::LTMWindow(Context *context) :
|
||||
QFont defaultFont; // mainwindow sets up the defaults.. we need to apply
|
||||
#ifdef NOWEBKIT
|
||||
dataSummary = new QWebEngineView(this);
|
||||
#if QT_VERSION >= 0x050800
|
||||
// stop stealing focus!
|
||||
dataSummary->settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false);
|
||||
#endif
|
||||
//XXXdataSummary->setEnabled(false); // stop grabbing focus
|
||||
if (dpiXFactor > 1) {
|
||||
// 80 lines per page on hidpi screens (?)
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#ifdef NOWEBKIT
|
||||
#include <QtWebChannel>
|
||||
#include <QWebEngineView>
|
||||
#include <QWebEngineSettings>
|
||||
#endif
|
||||
|
||||
// overlay helper
|
||||
@@ -121,6 +123,10 @@ RideMapWindow::RideMapWindow(Context *context, int mapType) : GcChartWindow(cont
|
||||
|
||||
#ifdef NOWEBKIT
|
||||
view = new QWebEngineView(this);
|
||||
#if QT_VERSION >= 0x050800
|
||||
// stop stealing focus!
|
||||
view->settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false);
|
||||
#endif
|
||||
#else
|
||||
view = new QWebView();
|
||||
#endif
|
||||
|
||||
@@ -91,12 +91,15 @@ RideSummaryWindow::RideSummaryWindow(Context *context, bool ridesummary) :
|
||||
vlayout->setSpacing(0);
|
||||
vlayout->setContentsMargins(10,10,10,10);
|
||||
|
||||
#ifdef NOWEBKIT
|
||||
#ifdef NOWEBKIT
|
||||
rideSummary = new QWebEngineView(this);
|
||||
//XXX steals focus rideSummary->setEnabled(false);
|
||||
#else
|
||||
#if QT_VERSION >= 0x050800
|
||||
// stop stealing focus!
|
||||
rideSummary->settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false);
|
||||
#endif
|
||||
#else
|
||||
rideSummary = new QWebView(this);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
rideSummary->setContentsMargins(0,0,0,0);
|
||||
rideSummary->page()->view()->setContentsMargins(0,0,0,0);
|
||||
|
||||
Reference in New Issue
Block a user