2020-10-09 13:56:42 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.3
|
|
|
|
import QtWebEngine 1.9
|
2021-10-01 18:58:36 +03:00
|
|
|
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.status 1.0
|
|
|
|
import shared.popups 1.0
|
2021-10-01 18:58:36 +03:00
|
|
|
|
2021-12-08 00:15:17 +01:00
|
|
|
import utils 1.0
|
2020-10-09 13:56:42 -04:00
|
|
|
|
2022-12-01 19:58:37 +03:00
|
|
|
// TODO: replace with StatusMenu
|
2020-10-09 13:56:42 -04:00
|
|
|
PopupMenu {
|
2021-12-08 00:15:17 +01:00
|
|
|
id: browserSettingsMenu
|
|
|
|
|
|
|
|
property bool isIncognito: false
|
|
|
|
|
|
|
|
signal addNewTab()
|
|
|
|
signal goIncognito(bool checked)
|
|
|
|
signal zoomIn()
|
|
|
|
signal zoomOut()
|
|
|
|
signal changeZoomFactor()
|
|
|
|
signal launchFindBar()
|
|
|
|
signal toggleCompatibilityMode(bool checked)
|
|
|
|
signal launchBrowserSettings()
|
2020-10-09 13:56:42 -04:00
|
|
|
|
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
|
|
|
|
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("New Tab")
|
2020-10-09 13:56:42 -04:00
|
|
|
shortcut: StandardKey.AddTab
|
2021-12-08 00:15:17 +01:00
|
|
|
onTriggered: addNewTab()
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
id: offTheRecordEnabled
|
|
|
|
// TODO show an indicator on the browser or tab?
|
2020-10-29 16:07:52 -04:00
|
|
|
text: checked ?
|
2022-04-04 13:26:30 +02:00
|
|
|
qsTr("Exit Incognito mode") :
|
|
|
|
qsTr("Go Incognito")
|
2020-10-09 13:56:42 -04:00
|
|
|
checkable: true
|
2021-12-08 00:15:17 +01:00
|
|
|
checked: isIncognito
|
|
|
|
onToggled: goIncognito(checked)
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
|
|
|
// TODO find a way to put both in one button
|
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Zoom In")
|
2020-10-09 13:56:42 -04:00
|
|
|
shortcut: StandardKey.ZoomIn
|
2021-12-08 00:15:17 +01:00
|
|
|
onTriggered: zoomIn()
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
2021-12-08 00:15:17 +01:00
|
|
|
|
2020-10-09 13:56:42 -04:00
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Zoom Out")
|
2020-10-09 13:56:42 -04:00
|
|
|
shortcut: StandardKey.ZoomOut
|
2021-12-08 00:15:17 +01:00
|
|
|
onTriggered: zoomOut()
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
2021-12-08 00:15:17 +01:00
|
|
|
|
2020-10-09 13:56:42 -04:00
|
|
|
Action {
|
|
|
|
shortcut: "Ctrl+0"
|
2021-12-08 00:15:17 +01:00
|
|
|
onTriggered: changeZoomFactor()
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Find")
|
2020-10-09 13:56:42 -04:00
|
|
|
shortcut: StandardKey.Find
|
2021-12-08 00:15:17 +01:00
|
|
|
onTriggered: launchFindBar()
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Compatibility mode")
|
2020-10-21 12:50:21 -04:00
|
|
|
checkable: true
|
|
|
|
checked: true
|
2021-12-08 00:15:17 +01:00
|
|
|
onToggled: toggleCompatibilityMode(checked)
|
2020-10-21 12:50:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Developer Tools")
|
2020-10-09 13:56:42 -04:00
|
|
|
shortcut: "F12"
|
|
|
|
onTriggered: {
|
2021-10-20 11:50:50 +02:00
|
|
|
localAccountSensitiveSettings.devToolsEnabled = !localAccountSensitiveSettings.devToolsEnabled
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
|
|
|
Action {
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Settings")
|
2020-10-09 13:56:42 -04:00
|
|
|
shortcut: "Ctrl+,"
|
2021-12-08 00:15:17 +01:00
|
|
|
onTriggered: launchBrowserSettings()
|
2020-10-09 13:56:42 -04:00
|
|
|
}
|
|
|
|
}
|