C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 16s
JS/TS / lint (pull_request) Successful in 17s
Python / fmt (pull_request) Successful in 32s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m0s
C++ / build (pull_request) Successful in 1m35s
Python / typecheck (pull_request) Failing after 1m12s
Rust / fmt (pull_request) Successful in 38s
Rust / build (pull_request) Successful in 1m34s
Rust / clippy (pull_request) Successful in 1m28s
Python / buildcheck (pull_request) Successful in 2m35s
C++ / clang-tidy (pull_request) Successful in 3m23s
170 lines
3.8 KiB
QML
170 lines
3.8 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import ZShell.Components
|
|
import qs.Helpers
|
|
import qs.Components
|
|
import qs.Config
|
|
import qs.Modules.Settings
|
|
import qs.Modules.Settings.Common
|
|
|
|
PageBase {
|
|
id: root
|
|
|
|
title: qsTr("Screenshots")
|
|
|
|
ColumnLayout {
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.top: parent.top
|
|
spacing: Appearance.spacing.extraSmall / 2
|
|
width: root.cappedWidth
|
|
|
|
SectionHeader {
|
|
first: true
|
|
text: qsTr("Behavior")
|
|
}
|
|
|
|
ToggleRow {
|
|
checked: Config.screenshot.saveOnCopy
|
|
first: true
|
|
last: true
|
|
settingAnchor: "screenshot-save-on-copy"
|
|
subtext: qsTr("Also save screenshot to disk when copying to clipboard")
|
|
text: qsTr("Save on copy")
|
|
|
|
onToggled: Config.screenshot.saveOnCopy = checked
|
|
}
|
|
|
|
SectionHeader {
|
|
text: qsTr("Effects")
|
|
}
|
|
|
|
ToggleRow {
|
|
checked: Config.screenshot.enable_pp
|
|
first: true
|
|
settingAnchor: "screenshot-enable"
|
|
text: qsTr("Enable effects")
|
|
|
|
onToggled: Config.screenshot.enable_pp = checked
|
|
}
|
|
|
|
SelectRow {
|
|
active: Config.screenshot.mode === "manual" ? menuItems[0] : menuItems[1]
|
|
enabled: Config.screenshot.enable_pp
|
|
last: true
|
|
settingAnchor: "screenshot-mode"
|
|
subtext: qsTr("Automatic or manual effect values")
|
|
text: qsTr("Effects mode")
|
|
|
|
menuItems: [
|
|
MenuItem {
|
|
icon: "build"
|
|
text: qsTr("Manual")
|
|
value: "manual"
|
|
},
|
|
MenuItem {
|
|
icon: "rotate_auto"
|
|
text: qsTr("Auto")
|
|
value: "auto"
|
|
}
|
|
]
|
|
|
|
onSelected: item => {
|
|
Config.screenshot.mode = item.value;
|
|
Config.save();
|
|
}
|
|
}
|
|
|
|
SectionHeader {
|
|
text: qsTr("Rounded corners")
|
|
}
|
|
|
|
ToggleRow {
|
|
checked: Config.screenshot.rounding
|
|
enabled: Config.screenshot.enable_pp && Config.screenshot.mode === "manual"
|
|
first: true
|
|
settingAnchor: "screenshot-enable-rounded-corners"
|
|
text: qsTr("Enable rounded corners")
|
|
|
|
onToggled: Config.screenshot.rounding = checked
|
|
}
|
|
|
|
SpinRow {
|
|
enabled: Config.screenshot.enable_pp && Config.screenshot.mode === "manual" && Config.screenshot.rounding
|
|
from: 0
|
|
last: true
|
|
settingAnchor: "screenshot-corner-radius"
|
|
stepSize: 1
|
|
text: qsTr("Corner radius")
|
|
to: 50
|
|
value: Config.screenshot.radius
|
|
|
|
onMoved: value => {
|
|
const newVal = Math.floor(value);
|
|
Config.screenshot.radius = newVal;
|
|
}
|
|
}
|
|
|
|
SectionHeader {
|
|
text: qsTr("Shadow")
|
|
}
|
|
|
|
ToggleRow {
|
|
checked: Config.screenshot.shadow
|
|
enabled: Config.screenshot.enable_pp && Config.screenshot.mode === "manual"
|
|
first: true
|
|
settingAnchor: "screenshot-enable-shadow"
|
|
text: qsTr("Enable shadow")
|
|
|
|
onToggled: Config.screenshot.shadow = checked
|
|
}
|
|
|
|
SpinRow {
|
|
enabled: Config.screenshot.enable_pp && Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
|
from: 0
|
|
settingAnchor: "screenshot-shadow-blur-amount"
|
|
stepSize: 1
|
|
text: qsTr("Shadow blur amount")
|
|
to: 100
|
|
value: Config.screenshot.shadow_blur
|
|
|
|
onMoved: value => {
|
|
const newVal = Math.floor(value);
|
|
Config.screenshot.shadow_blur = newVal;
|
|
}
|
|
}
|
|
|
|
SpinRow {
|
|
enabled: Config.screenshot.enable_pp && Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
|
from: -100
|
|
settingAnchor: "screenshot-shadow-horizontal-offset"
|
|
stepSize: 10
|
|
text: qsTr("Shadow horizontal offset")
|
|
to: 100
|
|
value: Config.screenshot.shadow_offset_x
|
|
|
|
onMoved: value => {
|
|
const newVal = Math.floor(value);
|
|
Config.screenshot.shadow_offset_x = newVal;
|
|
}
|
|
}
|
|
|
|
SpinRow {
|
|
enabled: Config.screenshot.enable_pp && Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
|
from: -100
|
|
last: true
|
|
settingAnchor: "screenshot-shadow-vertical-offset"
|
|
stepSize: 10
|
|
text: qsTr("Shadow vertical offset")
|
|
to: 100
|
|
value: Config.screenshot.shadow_offset_y
|
|
|
|
onMoved: value => {
|
|
const newVal = Math.floor(value);
|
|
Config.screenshot.shadow_offset_y = newVal;
|
|
}
|
|
}
|
|
}
|
|
}
|