status-desktop/ui/app/AppLayouts/Browser/popups/BrowserSettingsMenu.qml

97 lines
2.0 KiB
QML
Raw Permalink Normal View History

2020-10-09 17:56:42 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.3
import QtWebEngine 1.9
import shared 1.0
import shared.panels 1.0
import shared.status 1.0
import shared.popups 1.0
import utils 1.0
2020-10-09 17:56:42 +00:00
2022-12-01 16:58:37 +00:00
// TODO: replace with StatusMenu
2020-10-09 17:56:42 +00:00
PopupMenu {
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 17:56:42 +00:00
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
Action {
text: qsTr("New Tab")
2020-10-09 17:56:42 +00:00
shortcut: StandardKey.AddTab
onTriggered: addNewTab()
2020-10-09 17:56:42 +00:00
}
Action {
id: offTheRecordEnabled
// TODO show an indicator on the browser or tab?
2020-10-29 20:07:52 +00:00
text: checked ?
qsTr("Exit Incognito mode") :
qsTr("Go Incognito")
2020-10-09 17:56:42 +00:00
checkable: true
checked: isIncognito
onToggled: goIncognito(checked)
2020-10-09 17:56:42 +00:00
}
Separator {}
// TODO find a way to put both in one button
Action {
text: qsTr("Zoom In")
2020-10-09 17:56:42 +00:00
shortcut: StandardKey.ZoomIn
onTriggered: zoomIn()
2020-10-09 17:56:42 +00:00
}
2020-10-09 17:56:42 +00:00
Action {
text: qsTr("Zoom Out")
2020-10-09 17:56:42 +00:00
shortcut: StandardKey.ZoomOut
onTriggered: zoomOut()
2020-10-09 17:56:42 +00:00
}
2020-10-09 17:56:42 +00:00
Action {
shortcut: "Ctrl+0"
onTriggered: changeZoomFactor()
2020-10-09 17:56:42 +00:00
}
Separator {}
Action {
text: qsTr("Find")
2020-10-09 17:56:42 +00:00
shortcut: StandardKey.Find
onTriggered: launchFindBar()
2020-10-09 17:56:42 +00:00
}
Action {
text: qsTr("Compatibility mode")
checkable: true
checked: true
onToggled: toggleCompatibilityMode(checked)
}
Action {
text: qsTr("Developer Tools")
2020-10-09 17:56:42 +00:00
shortcut: "F12"
onTriggered: {
localAccountSensitiveSettings.devToolsEnabled = !localAccountSensitiveSettings.devToolsEnabled
2020-10-09 17:56:42 +00:00
}
}
Separator {}
Action {
text: qsTr("Settings")
2020-10-09 17:56:42 +00:00
shortcut: "Ctrl+,"
onTriggered: launchBrowserSettings()
2020-10-09 17:56:42 +00:00
}
}