From: Soren Stoutner Date: Sun, 30 Jan 2022 04:13:42 +0000 (-0700) Subject: Add a homepage setting. X-Git-Tag: v0.1~69 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=5452b388e3fcfc1c86a234f8354edab04354aa3a;p=PrivacyBrowserPC.git Add a homepage setting. --- diff --git a/src/mainview.cpp b/src/mainview.cpp index b1adcbf..5c59662 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -60,12 +60,15 @@ MainView::MainView(QWidget *parent) : QWidget(parent) // Set the focus on the WebEngine view. webEngineViewPointer->setFocus(); - // Load a website. - webEngineViewPointer->setUrl(QUrl(QStringLiteral("https://www.stoutner.com/"))); + // Load the homepage. TODO. Consider sanitizing the homepage input and adding things like protocols if they are missing. + webEngineViewPointer->setUrl(Settings::homepage()); } void MainView::loadUrl(const QString &urlFromUser) { + // Remove the focus from the URL line edit. + urlLineEditPointer->clearFocus(); + // Load the URL, adding standard protocol sections if needed. TODO. Replace this with logic that prefers HTTPS. webEngineViewPointer->setUrl(QUrl::fromUserInput(urlFromUser)); } diff --git a/src/settings.kcfg b/src/settings.kcfg index 7ef17aa..d4c5ffd 100644 --- a/src/settings.kcfg +++ b/src/settings.kcfg @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with Privacy Browser PC. If not, see . --> + + + https://www.mojeek.com/ + + 1.00 diff --git a/src/settings.ui b/src/settings.ui index 35d51b8..a6c876f 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -33,14 +33,51 @@ + + + Homepage + + + + Set the hompage. + + + + Set the homepage. The default is https://www.mojeek.com/. + + + + + + + + Set the hompage. + + + + Set the homepage. The default is https://www.mojeek.com/. + + + + + + Zoom factor + + + Set the zoom factor between 0.25 and 5.00. + + + + Set the zoom factor between 0.25 and 5.00. The default is 1.00. + - + Set the zoom factor between 0.25 and 5.00.