controlcenter: animation bug fix on flickables
This commit is contained in:
parent
28be7e8d33
commit
90bda07a90
2 changed files with 318 additions and 331 deletions
|
|
@ -104,6 +104,13 @@ ColumnLayout {
|
||||||
anchors.topMargin: Appearance.spacing.small
|
anchors.topMargin: Appearance.spacing.small
|
||||||
anchors.bottomMargin: Appearance.spacing.small
|
anchors.bottomMargin: Appearance.spacing.small
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
|
opacity: root.expanded ? 1.0 : 0.0
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
Anim {
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -200,22 +200,17 @@ RowLayout {
|
||||||
sidebarFlickable.collapseAllSections(colorVariantSection);
|
sidebarFlickable.collapseAllSections(colorVariantSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledListView {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: colorVariantSection.expanded ? Math.min(400, M3Variants.list.length * 60) : 0
|
|
||||||
|
|
||||||
model: M3Variants.list
|
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
clip: true
|
|
||||||
|
|
||||||
StyledScrollBar.vertical: StyledScrollBar {
|
Repeater {
|
||||||
flickable: parent
|
model: M3Variants.list
|
||||||
}
|
|
||||||
|
|
||||||
delegate: StyledRect {
|
delegate: StyledRect {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
||||||
width: parent ? parent.width : 0
|
Layout.fillWidth: true
|
||||||
|
|
||||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, modelData.variant === Schemes.currentVariant ? Colours.tPalette.m3surfaceContainer.a : 0)
|
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, modelData.variant === Schemes.currentVariant ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
|
|
@ -281,6 +276,7 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: colorSchemeSection
|
id: colorSchemeSection
|
||||||
|
|
@ -290,22 +286,17 @@ RowLayout {
|
||||||
sidebarFlickable.collapseAllSections(colorSchemeSection);
|
sidebarFlickable.collapseAllSections(colorSchemeSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledListView {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: colorSchemeSection.expanded ? Math.min(400, Schemes.list.length * 80) : 0
|
|
||||||
|
|
||||||
model: Schemes.list
|
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
clip: true
|
|
||||||
|
|
||||||
StyledScrollBar.vertical: StyledScrollBar {
|
Repeater {
|
||||||
flickable: parent
|
model: Schemes.list
|
||||||
}
|
|
||||||
|
|
||||||
delegate: StyledRect {
|
delegate: StyledRect {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
||||||
width: parent ? parent.width : 0
|
Layout.fillWidth: true
|
||||||
|
|
||||||
readonly property string schemeKey: `${modelData.name} ${modelData.flavour}`
|
readonly property string schemeKey: `${modelData.name} ${modelData.flavour}`
|
||||||
readonly property bool isCurrent: schemeKey === Schemes.currentScheme
|
readonly property bool isCurrent: schemeKey === Schemes.currentScheme
|
||||||
|
|
@ -426,6 +417,7 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: animationsSection
|
id: animationsSection
|
||||||
|
|
@ -548,22 +540,17 @@ RowLayout {
|
||||||
font.weight: 500
|
font.weight: 500
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledListView {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: fontsSection.expanded ? Math.min(300, Qt.fontFamilies().length * 50) : 0
|
|
||||||
|
|
||||||
model: Qt.fontFamilies()
|
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
clip: true
|
|
||||||
|
|
||||||
StyledScrollBar.vertical: StyledScrollBar {
|
Repeater {
|
||||||
flickable: parent
|
model: Qt.fontFamilies()
|
||||||
}
|
|
||||||
|
|
||||||
delegate: StyledRect {
|
delegate: StyledRect {
|
||||||
required property string modelData
|
required property string modelData
|
||||||
|
|
||||||
width: parent ? parent.width : 0
|
Layout.fillWidth: true
|
||||||
|
|
||||||
readonly property bool isCurrent: modelData === rootPane.fontFamilyMaterial
|
readonly property bool isCurrent: modelData === rootPane.fontFamilyMaterial
|
||||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
|
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||||
|
|
@ -612,6 +599,7 @@ RowLayout {
|
||||||
implicitHeight: fontFamilyMaterialRow.implicitHeight + Appearance.padding.normal * 2
|
implicitHeight: fontFamilyMaterialRow.implicitHeight + Appearance.padding.normal * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
Layout.topMargin: Appearance.spacing.normal
|
Layout.topMargin: Appearance.spacing.normal
|
||||||
|
|
@ -620,22 +608,17 @@ RowLayout {
|
||||||
font.weight: 500
|
font.weight: 500
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledListView {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: fontsSection.expanded ? Math.min(300, Qt.fontFamilies().length * 50) : 0
|
|
||||||
|
|
||||||
model: Qt.fontFamilies()
|
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
clip: true
|
|
||||||
|
|
||||||
StyledScrollBar.vertical: StyledScrollBar {
|
Repeater {
|
||||||
flickable: parent
|
model: Qt.fontFamilies()
|
||||||
}
|
|
||||||
|
|
||||||
delegate: StyledRect {
|
delegate: StyledRect {
|
||||||
required property string modelData
|
required property string modelData
|
||||||
|
|
||||||
width: parent ? parent.width : 0
|
Layout.fillWidth: true
|
||||||
|
|
||||||
readonly property bool isCurrent: modelData === rootPane.fontFamilyMono
|
readonly property bool isCurrent: modelData === rootPane.fontFamilyMono
|
||||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
|
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||||
|
|
@ -684,6 +667,7 @@ RowLayout {
|
||||||
implicitHeight: fontFamilyMonoRow.implicitHeight + Appearance.padding.normal * 2
|
implicitHeight: fontFamilyMonoRow.implicitHeight + Appearance.padding.normal * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
Layout.topMargin: Appearance.spacing.normal
|
Layout.topMargin: Appearance.spacing.normal
|
||||||
|
|
@ -692,22 +676,17 @@ RowLayout {
|
||||||
font.weight: 500
|
font.weight: 500
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledListView {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: fontsSection.expanded ? Math.min(300, Qt.fontFamilies().length * 50) : 0
|
|
||||||
|
|
||||||
model: Qt.fontFamilies()
|
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
clip: true
|
|
||||||
|
|
||||||
StyledScrollBar.vertical: StyledScrollBar {
|
Repeater {
|
||||||
flickable: parent
|
model: Qt.fontFamilies()
|
||||||
}
|
|
||||||
|
|
||||||
delegate: StyledRect {
|
delegate: StyledRect {
|
||||||
required property string modelData
|
required property string modelData
|
||||||
|
|
||||||
width: parent ? parent.width : 0
|
Layout.fillWidth: true
|
||||||
|
|
||||||
readonly property bool isCurrent: modelData === rootPane.fontFamilySans
|
readonly property bool isCurrent: modelData === rootPane.fontFamilySans
|
||||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
|
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, isCurrent ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||||
|
|
@ -756,6 +735,7 @@ RowLayout {
|
||||||
implicitHeight: fontFamilySansRow.implicitHeight + Appearance.padding.normal * 2
|
implicitHeight: fontFamilySansRow.implicitHeight + Appearance.padding.normal * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SectionContainer {
|
SectionContainer {
|
||||||
contentSpacing: Appearance.spacing.normal
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue