aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLibravatar Keshav <keshavnrj@gmail.com>2022-03-20 13:40:33 +0530
committerLibravatar Keshav <keshavnrj@gmail.com>2022-03-20 13:40:33 +0530
commitc5bf7a98f5f85eb3af53630b424c6a5d42868621 (patch)
tree565f793ca567d1be6fdab0412f321a8692c98f21 /src
parent51ac5fdaabfb45efd94e31b9fdadd489117a8baa (diff)
downloadwhatsie-c5bf7a98f5f85eb3af53630b424c6a5d42868621.tar.gz
whatsie-c5bf7a98f5f85eb3af53630b424c6a5d42868621.zip
feat: start application minimized. closes #19
- there is a setting to enable this feature
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp10
-rw-r--r--src/mainwindow.cpp60
-rw-r--r--src/mainwindow.h2
-rw-r--r--src/settingswidget.cpp52
-rw-r--r--src/settingswidget.h6
-rw-r--r--src/settingswidget.ui1319
6 files changed, 750 insertions, 699 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6aaa42a..68fbe3a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -68,14 +68,18 @@ int main(int argc, char *argv[]) {
MainWindow window;
QStringList argsList = app.arguments();
- qWarning() << "Launching with argument" << argsList;
foreach (QString argStr, argsList) {
if (argStr.contains("whatsapp://")) {
- qWarning() << "Link passed as argument" << argStr;
window.loadAppWithArgument(argStr);
}
}
- window.show();
+ QSettings settings;
+ if (QSystemTrayIcon::isSystemTrayAvailable() &&
+ settings.value("startMinimized", false).toBool()) {
+ window.runMinimized();
+ }else{
+ window.show();
+ }
return app.exec();
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a0da733..f8b29d1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -73,10 +73,9 @@ MainWindow::MainWindow(QWidget *parent)
});
}
-MainWindow::~MainWindow()
-{
- webEngine->deleteLater();
-}
+void MainWindow::runMinimized() { this->minimizeAction->trigger(); }
+
+MainWindow::~MainWindow() { webEngine->deleteLater(); }
void MainWindow::loadAppWithArgument(const QString &arg) {
// https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en
@@ -261,9 +260,6 @@ void MainWindow::init_settingWidget() {
// spell checker
settingsWidget->loadDictionaries(m_dictionaries);
-
- settingsWidget->resize(settingsWidget->sizeHint().width(),
- settingsWidget->minimumSizeHint().height());
}
}
@@ -307,7 +303,7 @@ void MainWindow::showSettings() {
if (!settingsWidget->isVisible()) {
this->updateSettingsUserAgentWidget();
settingsWidget->refresh();
- settingsWidget->showNormal();
+ settingsWidget->show();
}
}
@@ -747,30 +743,30 @@ void MainWindow::checkLoadedCorrectly() {
if (webEngine && webEngine->page()) {
// test 1 based on the class name of body of the page
webEngine->page()->runJavaScript(
- "document.querySelector('body').className",
- [this](const QVariant &result) {
- if (result.toString().contains("page-version", Qt::CaseInsensitive)) {
- qWarning() << "Test 1 found" << result.toString();
- webEngine->page()->runJavaScript(
- "document.getElementsByTagName('body')[0].innerText = ''");
- loadingQuirk("test1");
- } else if (webEngine->title().contains("Error",
- Qt::CaseInsensitive)) {
- utils::delete_cache(webEngine->page()->profile()->cachePath());
- utils::delete_cache(
- webEngine->page()->profile()->persistentStoragePath());
- settings.setValue("useragent", defaultUserAgentStr);
- utils *util = new utils(this);
- util->DisplayExceptionErrorDialog(
- "test1 handleWebViewTitleChanged(title) title: Error, "
- "Resetting UA, Quiting!\nUA: " +
- settings.value("useragent", "DefaultUA").toString());
-
- quitAction->trigger();
- } else {
- qWarning() << "Test 1 Loaded correctly value:" << result.toString();
- }
- });
+ "document.querySelector('body').className",
+ [this](const QVariant &result) {
+ if (result.toString().contains("page-version", Qt::CaseInsensitive)) {
+ qWarning() << "Test 1 found" << result.toString();
+ webEngine->page()->runJavaScript(
+ "document.getElementsByTagName('body')[0].innerText = ''");
+ loadingQuirk("test1");
+ } else if (webEngine->title().contains("Error",
+ Qt::CaseInsensitive)) {
+ utils::delete_cache(webEngine->page()->profile()->cachePath());
+ utils::delete_cache(
+ webEngine->page()->profile()->persistentStoragePath());
+ settings.setValue("useragent", defaultUserAgentStr);
+ utils *util = new utils(this);
+ util->DisplayExceptionErrorDialog(
+ "test1 handleWebViewTitleChanged(title) title: Error, "
+ "Resetting UA, Quiting!\nUA: " +
+ settings.value("useragent", "DefaultUA").toString());
+
+ quitAction->trigger();
+ } else {
+ qWarning() << "Test 1 Loaded correctly value:" << result.toString();
+ }
+ });
}
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 7676cb0..5ffe9b1 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -49,7 +49,7 @@ public slots:
void handleLoadFinished(bool loaded);
void handleDownloadRequested(QWebEngineDownloadItem *download);
void loadAppWithArgument(const QString &arg);
-
+ void runMinimized();
protected slots:
void closeEvent(QCloseEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
diff --git a/src/settingswidget.cpp b/src/settingswidget.cpp
index ba42372..b07340c 100644
--- a/src/settingswidget.cpp
+++ b/src/settingswidget.cpp
@@ -19,7 +19,6 @@ SettingsWidget::SettingsWidget(QWidget *parent, QString engineCachePath,
ui->zoomFactorSpinBox->setRange(0.25, 5.0);
ui->zoomFactorSpinBox->setValue(settings.value("zoomFactor", 1.0).toDouble());
- // emit zoomChanged();
ui->closeButtonActionComboBox->setCurrentIndex(
settings.value("closeButtonActionCombo", 0).toInt());
@@ -40,6 +39,8 @@ SettingsWidget::SettingsWidget(QWidget *parent, QString engineCachePath,
settings.value("notificationCombo", 1).toInt());
ui->useNativeFileDialog->setChecked(
settings.value("useNativeFileDialog", false).toBool());
+ ui->startMinimized->setChecked(
+ settings.value("startMinimized", false).toBool());
ui->automaticThemeCheckBox->blockSignals(true);
bool automaticThemeSwitching =
@@ -66,6 +67,51 @@ SettingsWidget::SettingsWidget(QWidget *parent, QString engineCachePath,
applyThemeQuirks();
ui->setUserAgent->setEnabled(false);
+
+ // event filter to prevent wheel event on certain widgets
+ foreach (QSlider *slider, this->findChildren<QSlider *>()) {
+ slider->installEventFilter(this);
+ }
+ foreach (QComboBox *box, this->findChildren<QComboBox *>()) {
+ box->installEventFilter(this);
+ }
+ foreach (QSpinBox *spinBox, this->findChildren<QSpinBox *>()) {
+ spinBox->installEventFilter(this);
+ }
+
+ ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+ this->setMinimumHeight(580);
+
+ ui->scrollArea->setMinimumWidth(
+ ui->groupBox_8->sizeHint().width() + ui->scrollArea->sizeHint().width() +
+ ui->scrollAreaWidgetContents->layout()->spacing());
+ if (settings.value("settingsGeo").isValid()) {
+ this->restoreGeometry(settings.value("settingsGeo").toByteArray());
+ }
+}
+
+bool SettingsWidget::eventFilter(QObject *obj, QEvent *event) {
+
+ if (isChildOf(this, obj)) {
+ if (event->type() == QEvent::Wheel) {
+ return true;
+ }
+ }
+ return QWidget::eventFilter(obj, event);
+}
+
+void SettingsWidget::closeEvent(QCloseEvent *event) {
+ settings.setValue("settingsGeo", this->saveGeometry());
+ QWidget::closeEvent(event);
+}
+
+bool SettingsWidget::isChildOf(QObject *Of, QObject *self) {
+ bool ischild = false;
+ if (Of->findChild<QWidget *>(self->objectName())) {
+ ischild = true;
+ }
+ return ischild;
}
inline bool inRange(unsigned low, unsigned high, unsigned x) {
@@ -441,3 +487,7 @@ void SettingsWidget::on_zoomReset_clicked() {
settings.setValue("zoomFactor", ui->zoomFactorSpinBox->value());
emit zoomChanged();
}
+
+void SettingsWidget::on_startMinimized_toggled(bool checked) {
+ settings.setValue("startMinimized", checked);
+}
diff --git a/src/settingswidget.h b/src/settingswidget.h
index 6f0fa4a..d7353ec 100644
--- a/src/settingswidget.h
+++ b/src/settingswidget.h
@@ -41,6 +41,9 @@ public slots:
void appLockSetChecked(bool checked);
void setCurrentPasswordText(QString str);
void loadDictionaries(QStringList dictionaries);
+protected slots:
+ bool eventFilter(QObject *obj, QEvent *event);
+ void closeEvent(QCloseEvent *event);
private slots:
QString cachePath();
QString persistentStoragePath();
@@ -94,6 +97,9 @@ private slots:
void on_zoomReset_clicked();
+ bool isChildOf(QObject *Of, QObject *self);
+ void on_startMinimized_toggled(bool checked);
+
private:
Ui::SettingsWidget *ui;
QString engineCachePath,enginePersistentStoragePath;
diff --git a/src/settingswidget.ui b/src/settingswidget.ui
index 55f55a1..09e5639 100644
--- a/src/settingswidget.ui
+++ b/src/settingswidget.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>512</width>
- <height>644</height>
+ <width>537</width>
+ <height>580</height>
</rect>
</property>
<property name="windowTitle">
@@ -88,699 +88,694 @@ background:transparent;
</layout>
</widget>
</item>
- <item alignment="Qt::AlignTop">
- <widget class="QWidget" name="verticalWidget" native="true">
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <property name="leftMargin">
- <number>9</number>
- </property>
- <property name="topMargin">
- <number>9</number>
- </property>
- <property name="rightMargin">
- <number>9</number>
- </property>
- <property name="bottomMargin">
- <number>9</number>
+ <item>
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>521</width>
+ <height>592</height>
+ </rect>
</property>
- <item alignment="Qt::AlignTop">
- <widget class="QGroupBox" name="groupBox_8">
- <property name="title">
- <string>General settings</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_4">
- <item row="8" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Close button action</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="closeButtonActionComboBox">
- <item>
- <property name="text">
- <string>Minimize to tray</string>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QGroupBox" name="groupBox_8">
+ <property name="title">
+ <string>General settings</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="8" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Close button action</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="closeButtonActionComboBox">
+ <item>
+ <property name="text">
+ <string>Minimize to tray</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/window-2-line.png</normaloff>:/icons/window-2-line.png</iconset>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Quit Application</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/shut-down-line.png</normaloff>:/icons/shut-down-line.png</iconset>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="5" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="applock_checkbox">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable application lock screen.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>Enable App Lock on Start</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="current_password">
+ <property name="text">
+ <string>Current Password:</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="1">
+ <widget class="Line" name="line_3">
+ <property name="minimumSize">
+ <size>
+ <width>1</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>1</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="notificationCheckBox">
+ <property name="text">
+ <string>Disable Notifications PopUp</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="autoPlayMediaCheckBox">
+ <property name="text">
+ <string>Disable Auto Playback of Media</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="muteAudioCheckBox">
+ <property name="text">
+ <string>Mute Audio from Page</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_9">
+ <item>
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>PopUp timeout</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="notificationTimeOutspinBox">
+ <property name="suffix">
+ <string> Secs</string>
+ </property>
+ <property name="minimum">
+ <number>2</number>
+ </property>
+ <property name="maximum">
+ <number>20</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0">
+ <widget class="Line" name="line_2">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>1</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>1</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_10">
+ <item>
+ <widget class="QCheckBox" name="startMinimized">
+ <property name="text">
+ <string>Start minimized</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="useNativeFileDialog">
+ <property name="text">
+ <string>Use Native File Dialog</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QCheckBox" name="enableSpellCheck">
+ <property name="text">
+ <string>Enable Spell Checker</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="minimumSize">
+ <size>
+ <width>1</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>1</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>SpellChecker Language</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="dictComboBox"/>
+ </item>
+ </layout>
+ </item>
+ <item row="10" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_8">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>App permissions</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="showPermissionsButton">
+ <property name="text">
+ <string> Show permissions</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/categories/security.png</normaloff>:/icons/categories/security.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="9" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Global App shortcuts</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="showShortcutsButton">
+ <property name="text">
+ <string> Show shortcuts</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/share-forward-line.png</normaloff>:/icons/share-forward-line.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
+ <item>
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Notification type</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="notificationCombo">
+ <item>
+ <property name="text">
+ <string>Native notification</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/categories/featured.png</normaloff>:/icons/categories/featured.png</iconset>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Customized notification</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/categories/devices-and-iot.png</normaloff>:/icons/categories/devices-and-iot.png</iconset>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="tryNotification">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string> Try</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/categories/science.png</normaloff>:/icons/categories/science.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="11" column="0">
+ <widget class="Line" name="line_4">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>1</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>1</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="13" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>User Agent</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="userAgentLineEdit"/>
+ </item>
+ <item>
+ <widget class="QPushButton" name="setUserAgent">
+ <property name="text">
+ <string> Set</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
- <normaloff>:/icons/window-2-line.png</normaloff>:/icons/window-2-line.png</iconset>
+ <normaloff>:/icons/categories/utilities.png</normaloff>:/icons/categories/utilities.png</iconset>
</property>
- </item>
- <item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="defaultUserAgentButton">
<property name="text">
- <string>Quit Application</string>
+ <string> Default</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
- <normaloff>:/icons/shut-down-line.png</normaloff>:/icons/shut-down-line.png</iconset>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- <item row="5" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <property name="topMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QCheckBox" name="applock_checkbox">
- <property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable application lock screen.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="text">
- <string>Enable App Lock on Start</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="current_password">
- <property name="text">
- <string>Current Password:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1">
- <widget class="Line" name="line_3">
- <property name="minimumSize">
- <size>
- <width>1</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>1</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
- </property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="notificationCheckBox">
- <property name="text">
- <string>Disable Notifications PopUp</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QCheckBox" name="autoPlayMediaCheckBox">
- <property name="text">
- <string>Disable Auto Playback of Media</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="muteAudioCheckBox">
- <property name="text">
- <string>Mute Audio from Page</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <layout class="QHBoxLayout" name="horizontalLayout_9">
- <item>
- <widget class="QLabel" name="label_14">
+ <normaloff>:/icons/refresh-line.png</normaloff>:/icons/refresh-line.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="7" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Theme</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="automaticThemeCheckBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Based on your system timezone and location.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>Automatic</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="themeComboBox">
+ <item>
<property name="text">
- <string>PopUp timeout</string>
+ <string>Dark</string>
</property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="notificationTimeOutspinBox">
- <property name="suffix">
- <string> Secs</string>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/moon-line.png</normaloff>:/icons/moon-line.png</iconset>
</property>
- <property name="minimum">
- <number>2</number>
+ </item>
+ <item>
+ <property name="text">
+ <string>Light</string>
</property>
- <property name="maximum">
- <number>20</number>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/lightbulb-line.png</normaloff>:/icons/lightbulb-line.png</iconset>
</property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item row="4" column="0">
- <widget class="Line" name="line_2">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>1</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>1</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_10">
- <item>
- <widget class="QCheckBox" name="useNativeFileDialog">
- <property name="text">
- <string>Use Native File Dialog</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QCheckBox" name="enableSpellCheck">
- <property name="text">
- <string>Enable Spell Checker</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="minimumSize">
- <size>
- <width>1</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>1</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>SpellChecker Language</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="dictComboBox"/>
- </item>
- </layout>
- </item>
- <item row="10" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_8">
- <property name="topMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>App permissions</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="showPermissionsButton">
- <property name="text">
- <string> Show permissions</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/categories/security.png</normaloff>:/icons/categories/security.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="9" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Global App shortcuts</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="showShortcutsButton">
- <property name="text">
- <string> Show shortcuts</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/share-forward-line.png</normaloff>:/icons/share-forward-line.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_11">
- <item>
- <widget class="QLabel" name="label_16">
- <property name="text">
- <string>Notification type</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="notificationCombo">
- <item>
- <property name="text">
- <string>Native notification</string>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="12" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_12">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>Zoom factor</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="zoomMinus">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Zoom Out</string>
+ </property>
+ <property name="text">
+ <string/>
</property>
<property name="icon">
<iconset resource="icons.qrc">
- <normaloff>:/icons/categories/featured.png</normaloff>:/icons/categories/featured.png</iconset>
+ <normaloff>:/icons/minus.png</normaloff>:/icons/minus.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDoubleSpinBox" name="zoomFactorSpinBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="buttonSymbols">
+ <enum>QAbstractSpinBox::NoButtons</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="zoomPlus">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Zoom In</string>
</property>
- </item>
- <item>
<property name="text">
- <string>Customized notification</string>
+ <string/>
</property>
<property name="icon">
<iconset resource="icons.qrc">
- <normaloff>:/icons/categories/devices-and-iot.png</normaloff>:/icons/categories/devices-and-iot.png</iconset>
- </property>
- </item>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="tryNotification">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string> Try</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/categories/science.png</normaloff>:/icons/categories/science.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="11" column="0">
- <widget class="Line" name="line_4">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>1</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>1</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="13" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>User Agent</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="userAgentLineEdit"/>
- </item>
- <item>
- <widget class="QPushButton" name="setUserAgent">
- <property name="text">
- <string> Set</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/categories/utilities.png</normaloff>:/icons/categories/utilities.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="defaultUserAgentButton">
- <property name="text">
- <string> Default</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/refresh-line.png</normaloff>:/icons/refresh-line.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="7" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Theme</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="automaticThemeCheckBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Based on your system timezone and location.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="text">
- <string>Automatic</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="themeComboBox">
- <item>
- <property name="text">
- <string>Dark</string>
+ <normaloff>:/icons/plus.png</normaloff>:/icons/plus.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line_5">
+ <property name="minimumSize">
+ <size>
+ <width>1</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>1</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="zoomReset">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>reset</string>
+ </property>
+ <property name="text">
+ <string/>
</property>
<property name="icon">
<iconset resource="icons.qrc">
- <normaloff>:/icons/moon-line.png</normaloff>:/icons/moon-line.png</iconset>
+ <normaloff>:/icons/arrow-go-back-line.png</normaloff>:/icons/arrow-go-back-line.png</iconset>
</property>
- </item>
- <item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_7">
+ <property name="title">
+ <string>Application Storage and Other Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="1" column="2">
+ <widget class="QPushButton" name="deleteCache">
<property name="text">
- <string>Light</string>
+ <string> Clear</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
- <normaloff>:/icons/lightbulb-line.png</normaloff>:/icons/lightbulb-line.png</iconset>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- <item row="12" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_12">
- <property name="topMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>Zoom factor</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="zoomMinus">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Zoom Out</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/minus.png</normaloff>:/icons/minus.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDoubleSpinBox" name="zoomFactorSpinBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="zoomPlus">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Zoom In</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/plus.png</normaloff>:/icons/plus.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="Line" name="line_5">
- <property name="minimumSize">
- <size>
- <width>1</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>1</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: rgba(63, 129, 216, 48);</string>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="zoomReset">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>reset</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/arrow-go-back-line.png</normaloff>:/icons/arrow-go-back-line.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item alignment="Qt::AlignTop">
- <widget class="QGroupBox" name="groupBox_7">
- <property name="title">
- <string>Application Storage and Other Settings</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="2">
- <widget class="QPushButton" name="deleteCache">
- <property name="text">
- <string> Clear</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/delete-bin-3-line.png</normaloff>:/icons/delete-bin-3-line.png</iconset>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Application Cache</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="cacheSize">
- <property name="text">
- <string>-</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_11">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- <italic>false</italic>
- </font>
- </property>
- <property name="text">
- <string>Property</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_13">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- <italic>false</italic>
- </font>
- </property>
- <property name="text">
- <string>Option</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_12">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- <italic>false</italic>
- </font>
- </property>
- <property name="text">
- <string>Size</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_5">
- <property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Persistent data includes persistent cookies, HTML5 local storage, and visited links.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="text">
- <string>Persistent data</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="cookieSize">
- <property name="text">
- <string>-</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QPushButton" name="deletePersistentData">
- <property name="text">
- <string> Clear</string>
- </property>
- <property name="icon">
- <iconset resource="icons.qrc">
- <normaloff>:/icons/delete-bin-3-line.png</normaloff>:/icons/delete-bin-3-line.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
+ <normaloff>:/icons/delete-bin-3-line.png</normaloff>:/icons/delete-bin-3-line.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Application Cache</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="cacheSize">
+ <property name="text">
+ <string>-</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <italic>false</italic>
+ </font>
+ </property>
+ <property name="text">
+ <string>Property</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_13">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <italic>false</italic>
+ </font>
+ </property>
+ <property name="text">
+ <string>Option</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_12">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <italic>false</italic>
+ </font>
+ </property>
+ <property name="text">
+ <string>Size</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Persistent data includes persistent cookies, HTML5 local storage, and visited links.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>Persistent data</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="cookieSize">
+ <property name="text">
+ <string>-</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="deletePersistentData">
+ <property name="text">
+ <string> Clear</string>
+ </property>
+ <property name="icon">
+ <iconset resource="icons.qrc">
+ <normaloff>:/icons/delete-bin-3-line.png</normaloff>:/icons/delete-bin-3-line.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
<widget class="QWidget" name="bottomLine" native="true">
<property name="minimumSize">
<size>