test nix
This commit is contained in:
@@ -4,10 +4,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property string setting
|
||||
@@ -45,6 +47,22 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.smaller
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: root.implicitHeight
|
||||
Layout.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
z: -1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
|
||||
@@ -4,10 +4,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property string setting
|
||||
@@ -41,6 +43,22 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.smaller
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: root.implicitHeight
|
||||
Layout.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
z: -1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
|
||||
@@ -6,6 +6,7 @@ import QtQuick.Layouts
|
||||
import QtQml.Models
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -19,6 +20,7 @@ Item {
|
||||
property var draggedModelData: null
|
||||
property string draggedUid: ""
|
||||
property bool dropAnimating: false
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
property var pendingCommitEntries: []
|
||||
@@ -231,6 +233,21 @@ Item {
|
||||
|
||||
Component.onCompleted: root.rebuildVisualEntries()
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
z: -1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
id: settleAnim
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property list<string> settings
|
||||
@@ -33,6 +35,20 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight + Appearance.padding.smaller * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property string setting
|
||||
@@ -22,6 +24,20 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight + Appearance.padding.smaller * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
||||
@@ -2,16 +2,32 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property string value
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight + Appearance.padding.smaller * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
||||
@@ -2,20 +2,36 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
property real max: Infinity
|
||||
property real min: -Infinity
|
||||
required property string name
|
||||
required property var object
|
||||
required property string setting
|
||||
property real max: Infinity
|
||||
property real min: -Infinity
|
||||
property real step: 1
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight + Appearance.padding.smaller * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property list<string> settings
|
||||
@@ -33,6 +35,20 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight + Appearance.padding.smaller * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
||||
@@ -2,18 +2,34 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string addLabel: qsTr("Add entry")
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property string setting
|
||||
property string addLabel: qsTr("Add entry")
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: layout.implicitHeight
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool highlighted: SettingsHighlight.highlightedSetting === name
|
||||
required property string name
|
||||
required property var object
|
||||
required property string setting
|
||||
@@ -13,6 +15,20 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight + Appearance.padding.smaller * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
opacity: root.highlighted ? 0.5 : 0
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
||||
@@ -9,6 +9,24 @@ CustomFlickable {
|
||||
|
||||
default property alias contentData: clayout.data
|
||||
|
||||
// Find and scroll to a section by its sectionId, then highlight a specific setting
|
||||
function scrollToSectionAndHighlight(sectionId: string, settingName: string) {
|
||||
// Find the section with matching sectionId
|
||||
for (let i = 0; i < clayout.children.length; i++) {
|
||||
const section = clayout.children[i];
|
||||
if (section.sectionId === sectionId) {
|
||||
// Scroll to the section with some padding
|
||||
const targetY = section.y - Appearance.padding.normal;
|
||||
contentY = Math.max(0, Math.min(targetY, contentHeight - height));
|
||||
|
||||
// Use the singleton to highlight the setting
|
||||
SettingsHighlight.highlight(settingName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
contentHeight: clayout.implicitHeight
|
||||
|
||||
TapHandler {
|
||||
|
||||
@@ -8,6 +8,7 @@ CustomRect {
|
||||
|
||||
default property alias contentData: layout.data
|
||||
property real contentPadding: Appearance.padding.large
|
||||
property string sectionId: ""
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: layout.implicitHeight + contentPadding * 2
|
||||
|
||||
Reference in New Issue
Block a user