Settings: cleanup of TimeWeather and ScreenRecorder
This commit is contained in:
parent
19431fa6a2
commit
a7e40e643b
4 changed files with 76 additions and 288 deletions
|
|
@ -100,7 +100,7 @@ PanelWithOverlay {
|
||||||
Component {
|
Component {
|
||||||
id: recordingSettings
|
id: recordingSettings
|
||||||
|
|
||||||
Recording {
|
ScreenRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import qs.Settings
|
|
||||||
import qs.Components
|
import qs.Components
|
||||||
|
import qs.Settings
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -14,7 +15,6 @@ Rectangle {
|
||||||
border.width: 1 * Theme.uiScale
|
border.width: 1 * Theme.uiScale
|
||||||
|
|
||||||
property bool useFahrenheit: Settings.settings.useFahrenheit
|
property bool useFahrenheit: Settings.settings.useFahrenheit
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: slider
|
id: slider
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ ColumnLayout {
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
padding: 0
|
padding: 16
|
||||||
rightPadding: 12
|
rightPadding: 12
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
|
@ -687,6 +687,7 @@ ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 8
|
Layout.topMargin: 8
|
||||||
|
Layout.bottomMargin: 16
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Color Range"
|
text: "Color Range"
|
||||||
|
|
@ -789,82 +790,14 @@ ColumnLayout {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ToggleOption {
|
||||||
spacing: 8
|
label: "Show Cursor"
|
||||||
Layout.fillWidth: true
|
description: "Record mouse cursor in the video"
|
||||||
Layout.topMargin: 8
|
value: Settings.settings.showCursor
|
||||||
|
onToggled: function() {
|
||||||
RowLayout {
|
Settings.settings.showCursor = !Settings.settings.showCursor;
|
||||||
spacing: 8
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 4
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "Show Cursor"
|
|
||||||
font.pixelSize: 13 * Theme.uiScale
|
|
||||||
font.bold: true
|
|
||||||
color: Theme.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "Record mouse cursor in the video"
|
|
||||||
font.pixelSize: 12 * Theme.uiScale
|
|
||||||
color: Theme.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: cursorSwitch
|
|
||||||
|
|
||||||
width: 52
|
|
||||||
height: 32
|
|
||||||
radius: 16
|
|
||||||
color: Settings.settings.showCursor ? Theme.accentPrimary : Theme.surfaceVariant
|
|
||||||
border.color: Settings.settings.showCursor ? Theme.accentPrimary : Theme.outline
|
|
||||||
border.width: 2
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: cursorThumb
|
|
||||||
|
|
||||||
width: 28
|
|
||||||
height: 28
|
|
||||||
radius: 14
|
|
||||||
color: Theme.surface
|
|
||||||
border.color: Theme.outline
|
|
||||||
border.width: 1
|
|
||||||
y: 2
|
|
||||||
x: Settings.settings.showCursor ? cursorSwitch.width - width - 2 : 2
|
|
||||||
|
|
||||||
Behavior on x {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: 200
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
Settings.settings.showCursor = !Settings.settings.showCursor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -5,216 +5,75 @@ import qs.Components
|
||||||
import qs.Settings
|
import qs.Settings
|
||||||
import qs.Widgets.SettingsWindow.Tabs.Components
|
import qs.Widgets.SettingsWindow.Tabs.Components
|
||||||
|
|
||||||
ScrollView {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
id: root
|
||||||
padding: 0
|
|
||||||
rightPadding: 12
|
|
||||||
clip: true
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
||||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: root
|
|
||||||
width: parent.availableWidth
|
|
||||||
spacing: 0
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.margins: 0
|
|
||||||
|
|
||||||
Item {
|
spacing: 0
|
||||||
Layout.fillWidth: true
|
anchors.fill: parent
|
||||||
Layout.preferredHeight: 0
|
anchors.margins: 0
|
||||||
}
|
|
||||||
|
ScrollView {
|
||||||
|
id: scrollView
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
padding: 16
|
||||||
|
rightPadding: 12
|
||||||
|
clip: true
|
||||||
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 4
|
width: scrollView.availableWidth
|
||||||
Layout.fillWidth: true
|
spacing: 0
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Time"
|
text: "Time"
|
||||||
font.pixelSize: 18 * Theme.uiScale
|
font.pixelSize: 18 * Theme.uiScale
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
Layout.bottomMargin: 8
|
Layout.bottomMargin: 16 * Theme.uiScale
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ToggleOption {
|
||||||
spacing: 8
|
label: "Use 12 Hour Clock"
|
||||||
Layout.fillWidth: true
|
description: "Display time in 12-hour format (e.g., 2:30 PM) instead of 24-hour format"
|
||||||
Layout.topMargin: 8
|
value: Settings.settings.use12HourClock
|
||||||
|
onToggled: function() {
|
||||||
RowLayout {
|
Settings.settings.use12HourClock = !Settings.settings.use12HourClock;
|
||||||
spacing: 8
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 4
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "Use 12 Hour Clock"
|
|
||||||
font.pixelSize: 13 * Theme.uiScale
|
|
||||||
font.bold: true
|
|
||||||
color: Theme.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "Display time in 12-hour format (e.g., 2:30 PM) instead of 24-hour format"
|
|
||||||
font.pixelSize: 12 * Theme.uiScale
|
|
||||||
color: Theme.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: use12HourClockSwitch
|
|
||||||
|
|
||||||
width: 52
|
|
||||||
height: 32
|
|
||||||
radius: 16
|
|
||||||
color: Settings.settings.use12HourClock ? Theme.accentPrimary : Theme.surfaceVariant
|
|
||||||
border.color: Settings.settings.use12HourClock ? Theme.accentPrimary : Theme.outline
|
|
||||||
border.width: 2
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: use12HourClockThumb
|
|
||||||
|
|
||||||
width: 28
|
|
||||||
height: 28
|
|
||||||
radius: 14
|
|
||||||
color: Theme.surface
|
|
||||||
border.color: Theme.outline
|
|
||||||
border.width: 1
|
|
||||||
y: 2
|
|
||||||
x: Settings.settings.use12HourClock ? use12HourClockSwitch.width - width - 2 : 2
|
|
||||||
|
|
||||||
Behavior on x {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: 200
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
Settings.settings.use12HourClock = !Settings.settings.use12HourClock;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ToggleOption {
|
||||||
spacing: 8
|
label: "US Style Date"
|
||||||
Layout.fillWidth: true
|
description: "Display dates in MM/DD/YYYY format instead of DD/MM/YYYY"
|
||||||
Layout.topMargin: 8
|
value: Settings.settings.reverseDayMonth
|
||||||
|
onToggled: function() {
|
||||||
RowLayout {
|
Settings.settings.reverseDayMonth = !Settings.settings.reverseDayMonth;
|
||||||
spacing: 8
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 4
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "US Style Date"
|
|
||||||
font.pixelSize: 13 * Theme.uiScale
|
|
||||||
font.bold: true
|
|
||||||
color: Theme.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "Display dates in MM/DD/YYYY format instead of DD/MM/YYYY"
|
|
||||||
font.pixelSize: 12 * Theme.uiScale
|
|
||||||
color: Theme.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: reverseDayMonthSwitch
|
|
||||||
|
|
||||||
width: 52
|
|
||||||
height: 32
|
|
||||||
radius: 16
|
|
||||||
color: Settings.settings.reverseDayMonth ? Theme.accentPrimary : Theme.surfaceVariant
|
|
||||||
border.color: Settings.settings.reverseDayMonth ? Theme.accentPrimary : Theme.outline
|
|
||||||
border.width: 2
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: reverseDayMonthThumb
|
|
||||||
|
|
||||||
width: 28
|
|
||||||
height: 28
|
|
||||||
radius: 14
|
|
||||||
color: Theme.surface
|
|
||||||
border.color: Theme.outline
|
|
||||||
border.width: 1
|
|
||||||
y: 2
|
|
||||||
x: Settings.settings.reverseDayMonth ? reverseDayMonthSwitch.width - width - 2 : 2
|
|
||||||
|
|
||||||
Behavior on x {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: 200
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
Settings.settings.reverseDayMonth = !Settings.settings.reverseDayMonth;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
Rectangle {
|
||||||
|
Layout.fillWidth: true
|
||||||
Rectangle {
|
Layout.topMargin: 26
|
||||||
Layout.fillWidth: true
|
Layout.bottomMargin: 18
|
||||||
Layout.topMargin: 26
|
height: 1
|
||||||
Layout.bottomMargin: 18
|
color: Theme.outline
|
||||||
height: 1
|
opacity: 0.3
|
||||||
color: Theme.outline
|
}
|
||||||
opacity: 0.3
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 4
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Weather"
|
text: "Weather"
|
||||||
font.pixelSize: 18 * Theme.uiScale
|
font.pixelSize: 18 * Theme.uiScale
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
Layout.bottomMargin: 8
|
Layout.bottomMargin: 16 * Theme.uiScale
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.bottomMargin: 8 * Theme.uiScale
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "City"
|
text: "City"
|
||||||
|
|
@ -273,39 +132,39 @@ ScrollView {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
ColumnLayout {
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 8
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 8
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
|
|
||||||
ColumnLayout {
|
RowLayout {
|
||||||
spacing: 4
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Text {
|
ColumnLayout {
|
||||||
text: "Temperature Unit"
|
spacing: 4
|
||||||
font.pixelSize: 13 * Theme.uiScale
|
|
||||||
font.bold: true
|
|
||||||
color: Theme.textPrimary
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: "Choose between Celsius and Fahrenheit"
|
|
||||||
font.pixelSize: 12 * Theme.uiScale
|
|
||||||
color: Theme.textSecondary
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: "Temperature Unit"
|
||||||
|
font.pixelSize: 13 * Theme.uiScale
|
||||||
|
font.bold: true
|
||||||
|
color: Theme.textPrimary
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: "Choose between Celsius and Fahrenheit"
|
||||||
|
font.pixelSize: 12 * Theme.uiScale
|
||||||
|
color: Theme.textSecondary
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
UnitSelector {
|
||||||
|
}
|
||||||
|
|
||||||
UnitSelector {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -314,8 +173,4 @@ ScrollView {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue