zshell-img-tools #104
@@ -28,6 +28,7 @@ RowLayout {
|
|||||||
CustomTextField {
|
CustomTextField {
|
||||||
id: textField
|
id: textField
|
||||||
|
|
||||||
|
color: root.enabled ? DynamicColors.palette.m3onSurface : Qt.alpha(DynamicColors.palette.m3onSurface, 0.5)
|
||||||
implicitHeight: upButton.implicitHeight
|
implicitHeight: upButton.implicitHeight
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
leftPadding: Appearance.padding.normal
|
leftPadding: Appearance.padding.normal
|
||||||
@@ -36,7 +37,7 @@ RowLayout {
|
|||||||
text: root.isEditing ? text : root.displayText
|
text: root.isEditing ? text : root.displayText
|
||||||
|
|
||||||
background: CustomRect {
|
background: CustomRect {
|
||||||
color: DynamicColors.tPalette.m3surfaceContainerHigh
|
color: root.enabled ? DynamicColors.tPalette.m3surfaceContainerHigh : DynamicColors.tPalette.m3surfaceContainerLow
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
}
|
}
|
||||||
@@ -85,7 +86,7 @@ RowLayout {
|
|||||||
CustomRect {
|
CustomRect {
|
||||||
id: upButton
|
id: upButton
|
||||||
|
|
||||||
color: DynamicColors.palette.m3primary
|
color: root.enabled ? DynamicColors.palette.m3primary : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHighest, 1)
|
||||||
implicitHeight: upIcon.implicitHeight + Appearance.padding.small * 2
|
implicitHeight: upIcon.implicitHeight + Appearance.padding.small * 2
|
||||||
implicitWidth: implicitHeight
|
implicitWidth: implicitHeight
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
@@ -113,13 +114,13 @@ RowLayout {
|
|||||||
id: upIcon
|
id: upIcon
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: DynamicColors.palette.m3onPrimary
|
color: root.enabled ? DynamicColors.palette.m3onPrimary : Qt.alpha(DynamicColors.palette.m3onSurface, 0.5)
|
||||||
text: "keyboard_arrow_up"
|
text: "keyboard_arrow_up"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomRect {
|
CustomRect {
|
||||||
color: DynamicColors.palette.m3primary
|
color: root.enabled ? DynamicColors.palette.m3primary : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHighest, 1)
|
||||||
implicitHeight: downIcon.implicitHeight + Appearance.padding.small * 2
|
implicitHeight: downIcon.implicitHeight + Appearance.padding.small * 2
|
||||||
implicitWidth: implicitHeight
|
implicitWidth: implicitHeight
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
@@ -147,7 +148,7 @@ RowLayout {
|
|||||||
id: downIcon
|
id: downIcon
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: DynamicColors.palette.m3onPrimary
|
color: root.enabled ? DynamicColors.palette.m3onPrimary : Qt.alpha(DynamicColors.palette.m3onSurface, 0.5)
|
||||||
text: "keyboard_arrow_down"
|
text: "keyboard_arrow_down"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,14 +35,10 @@ Row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openDropdown(): void {
|
function openDropdown(): void {
|
||||||
if (root.disabled)
|
|
||||||
return;
|
|
||||||
SettingsDropdowns.open(menu, root);
|
SettingsDropdowns.open(menu, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleDropdown(): void {
|
function toggleDropdown(): void {
|
||||||
if (root.disabled)
|
|
||||||
return;
|
|
||||||
SettingsDropdowns.toggle(menu, root);
|
SettingsDropdowns.toggle(menu, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +51,7 @@ Row {
|
|||||||
|
|
||||||
CustomRect {
|
CustomRect {
|
||||||
bottomRightRadius: Appearance.rounding.small / 2
|
bottomRightRadius: Appearance.rounding.small / 2
|
||||||
color: root.disabled ? root.disabledColor : root.color
|
color: !root.enabled ? root.disabledColor : root.color
|
||||||
implicitHeight: expandBtn.implicitHeight
|
implicitHeight: expandBtn.implicitHeight
|
||||||
implicitWidth: textRow.implicitWidth + root.horizontalPadding * 2
|
implicitWidth: textRow.implicitWidth + root.horizontalPadding * 2
|
||||||
radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||||
@@ -69,7 +65,7 @@ Row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
color: root.textColor
|
color: root.textColor
|
||||||
disabled: root.disabled
|
disabled: !root.enabled
|
||||||
rect.bottomRightRadius: parent.bottomRightRadius
|
rect.bottomRightRadius: parent.bottomRightRadius
|
||||||
rect.topRightRadius: parent.topRightRadius
|
rect.topRightRadius: parent.topRightRadius
|
||||||
}
|
}
|
||||||
@@ -86,7 +82,7 @@ Row {
|
|||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
animate: true
|
animate: true
|
||||||
color: root.disabled ? root.disabledTextColor : root.textColor
|
color: !root.enabled ? root.disabledTextColor : root.textColor
|
||||||
fill: 1
|
fill: 1
|
||||||
text: root.active?.activeIcon ?? root.fallbackIcon
|
text: root.active?.activeIcon ?? root.fallbackIcon
|
||||||
}
|
}
|
||||||
@@ -98,7 +94,7 @@ Row {
|
|||||||
Layout.preferredWidth: implicitWidth
|
Layout.preferredWidth: implicitWidth
|
||||||
animate: true
|
animate: true
|
||||||
clip: true
|
clip: true
|
||||||
color: root.disabled ? root.disabledTextColor : root.textColor
|
color: !root.enabled ? root.disabledTextColor : root.textColor
|
||||||
text: root.active?.activeText ?? root.fallbackText
|
text: root.active?.activeText ?? root.fallbackText
|
||||||
|
|
||||||
Behavior on Layout.preferredWidth {
|
Behavior on Layout.preferredWidth {
|
||||||
@@ -116,7 +112,7 @@ Row {
|
|||||||
property real rad: root.expanded ? implicitHeight / 2 * Math.min(1, Appearance.rounding.scale) : Appearance.rounding.small / 2
|
property real rad: root.expanded ? implicitHeight / 2 * Math.min(1, Appearance.rounding.scale) : Appearance.rounding.small / 2
|
||||||
|
|
||||||
bottomLeftRadius: rad
|
bottomLeftRadius: rad
|
||||||
color: root.disabled ? root.disabledColor : root.color
|
color: !root.enabled ? root.disabledColor : root.color
|
||||||
implicitHeight: expandIcon.implicitHeight + root.verticalPadding * 2
|
implicitHeight: expandIcon.implicitHeight + root.verticalPadding * 2
|
||||||
implicitWidth: implicitHeight
|
implicitWidth: implicitHeight
|
||||||
radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||||
@@ -135,7 +131,7 @@ Row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
color: root.textColor
|
color: root.textColor
|
||||||
disabled: root.disabled
|
disabled: !root.enabled
|
||||||
rect.bottomLeftRadius: parent.bottomLeftRadius
|
rect.bottomLeftRadius: parent.bottomLeftRadius
|
||||||
rect.topLeftRadius: parent.topLeftRadius
|
rect.topLeftRadius: parent.topLeftRadius
|
||||||
}
|
}
|
||||||
@@ -145,7 +141,7 @@ Row {
|
|||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
anchors.horizontalCenterOffset: root.expanded ? 0 : -Math.floor(root.verticalPadding / 4)
|
anchors.horizontalCenterOffset: root.expanded ? 0 : -Math.floor(root.verticalPadding / 4)
|
||||||
color: root.disabled ? root.disabledTextColor : root.textColor
|
color: !root.enabled ? root.disabledTextColor : root.textColor
|
||||||
rotation: root.expanded ? 180 : 0
|
rotation: root.expanded ? 180 : 0
|
||||||
text: "expand_more"
|
text: "expand_more"
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Switch {
|
|||||||
implicitWidth: implicitIndicatorWidth
|
implicitWidth: implicitIndicatorWidth
|
||||||
|
|
||||||
indicator: CustomRect {
|
indicator: CustomRect {
|
||||||
color: root.checked ? DynamicColors.palette.m3primary : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHighest, root.cLayer)
|
color: root.checked && root.enabled ? DynamicColors.palette.m3primary : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHighest, root.cLayer)
|
||||||
implicitHeight: 13 + 7 * 2
|
implicitHeight: 13 + 7 * 2
|
||||||
implicitWidth: implicitHeight * 1.7
|
implicitWidth: implicitHeight * 1.7
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
@@ -21,7 +21,7 @@ Switch {
|
|||||||
readonly property real nonAnimWidth: root.pressed ? implicitHeight * 1.3 : implicitHeight
|
readonly property real nonAnimWidth: root.pressed ? implicitHeight * 1.3 : implicitHeight
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: root.checked ? DynamicColors.palette.m3onPrimary : DynamicColors.layer(DynamicColors.palette.m3outline, root.cLayer + 1)
|
color: root.checked && root.enabled ? DynamicColors.palette.m3onPrimary : DynamicColors.layer(DynamicColors.palette.m3outline, root.cLayer + 1)
|
||||||
implicitHeight: parent.implicitHeight - 10
|
implicitHeight: parent.implicitHeight - 10
|
||||||
implicitWidth: nonAnimWidth
|
implicitWidth: nonAnimWidth
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
@@ -38,7 +38,7 @@ Switch {
|
|||||||
|
|
||||||
CustomRect {
|
CustomRect {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: root.checked ? DynamicColors.palette.m3primary : DynamicColors.palette.m3onSurface
|
color: root.checked && root.enabled ? DynamicColors.palette.m3primary : DynamicColors.palette.m3onSurface
|
||||||
opacity: root.pressed ? 0.1 : root.hovered ? 0.08 : 0
|
opacity: root.pressed ? 0.1 : root.hovered ? 0.08 : 0
|
||||||
radius: parent.radius
|
radius: parent.radius
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ Switch {
|
|||||||
fillColor: "transparent"
|
fillColor: "transparent"
|
||||||
startX: icon.start1.x
|
startX: icon.start1.x
|
||||||
startY: icon.start1.y
|
startY: icon.start1.y
|
||||||
strokeColor: root.checked ? DynamicColors.palette.m3primary : DynamicColors.palette.m3surfaceContainerHighest
|
strokeColor: root.checked && root.enabled ? DynamicColors.palette.m3primary : DynamicColors.palette.m3surfaceContainerHighest
|
||||||
strokeWidth: Appearance.font.size.larger * 0.15
|
strokeWidth: Appearance.font.size.larger * 0.15
|
||||||
|
|
||||||
Behavior on strokeColor {
|
Behavior on strokeColor {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ SettingsPage {
|
|||||||
|
|
||||||
CustomSplitButtonRow {
|
CustomSplitButtonRow {
|
||||||
active: Config.general.color.mode === "light" ? menuItems[0] : menuItems[1]
|
active: Config.general.color.mode === "light" ? menuItems[0] : menuItems[1]
|
||||||
buttonAlias.disabled: !Config.general.color.schemeGeneration
|
enabled: Config.general.color.schemeGeneration
|
||||||
label: qsTr("Scheme mode")
|
label: qsTr("Scheme mode")
|
||||||
|
|
||||||
menuItems: [
|
menuItems: [
|
||||||
@@ -103,7 +103,7 @@ SettingsPage {
|
|||||||
id: schemeType
|
id: schemeType
|
||||||
|
|
||||||
active: root.schemeTypeItem(menuItems, Config.colors.schemeType)
|
active: root.schemeTypeItem(menuItems, Config.colors.schemeType)
|
||||||
buttonAlias.disabled: !Config.general.color.schemeGeneration
|
enabled: Config.general.color.schemeGeneration
|
||||||
label: qsTr("Scheme type")
|
label: qsTr("Scheme type")
|
||||||
z: 2
|
z: 2
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ SettingsPage {
|
|||||||
|
|
||||||
CustomSplitButtonRow {
|
CustomSplitButtonRow {
|
||||||
active: Config.screenshot.mode === "manual" ? menuItems[0] : menuItems[1]
|
active: Config.screenshot.mode === "manual" ? menuItems[0] : menuItems[1]
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
label: qsTr("Effects mode")
|
label: qsTr("Effects mode")
|
||||||
|
|
||||||
menuItems: [
|
menuItems: [
|
||||||
@@ -46,31 +47,8 @@ SettingsPage {
|
|||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual"
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
|
||||||
min: 0
|
|
||||||
name: "Corner radius"
|
|
||||||
object: Config.screenshot
|
|
||||||
setting: "radius"
|
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
|
||||||
step: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Separator {
|
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingSwitch {
|
|
||||||
name: "Enable shadow"
|
|
||||||
object: Config.screenshot
|
|
||||||
setting: "shadow"
|
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
|
||||||
}
|
|
||||||
|
|
||||||
Separator {
|
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingSwitch {
|
SettingSwitch {
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
name: "Enable rounded corners"
|
name: "Enable rounded corners"
|
||||||
object: Config.screenshot
|
object: Config.screenshot
|
||||||
setting: "rounding"
|
setting: "rounding"
|
||||||
@@ -78,15 +56,16 @@ SettingsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Separator {
|
Separator {
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.rounding
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
min: 0
|
min: 0
|
||||||
name: "Shadow blur amount"
|
name: "Corner radius"
|
||||||
object: Config.screenshot
|
object: Config.screenshot
|
||||||
setting: "shadow_blur"
|
setting: "radius"
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.rounding
|
||||||
step: 1
|
step: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +73,32 @@ SettingsPage {
|
|||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingSwitch {
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
|
name: "Enable shadow"
|
||||||
|
object: Config.screenshot
|
||||||
|
setting: "shadow"
|
||||||
|
shouldBeActive: Config.screenshot.mode === "manual"
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingSpinBox {
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
|
min: 0
|
||||||
|
name: "Shadow blur amount"
|
||||||
|
object: Config.screenshot
|
||||||
|
setting: "shadow_blur"
|
||||||
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
||||||
|
step: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
||||||
|
}
|
||||||
|
|
||||||
// SettingSwitch {
|
// SettingSwitch {
|
||||||
// name: "Shadow color broken atm"
|
// name: "Shadow color broken atm"
|
||||||
// object: Config.Screenshot
|
// object: Config.Screenshot
|
||||||
@@ -119,24 +124,26 @@ SettingsPage {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
min: 0
|
min: 0
|
||||||
name: "Shadow offset X"
|
name: "Shadow offset X"
|
||||||
object: Config.screenshot
|
object: Config.screenshot
|
||||||
setting: "shadow_offset_x"
|
setting: "shadow_offset_x"
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
||||||
step: 1
|
step: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Separator {
|
Separator {
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
|
enabled: Config.screenshot.enable_pp
|
||||||
min: 0
|
min: 0
|
||||||
name: "Shadow offset Y"
|
name: "Shadow offset Y"
|
||||||
object: Config.screenshot
|
object: Config.screenshot
|
||||||
setting: "shadow_offset_y"
|
setting: "shadow_offset_y"
|
||||||
shouldBeActive: Config.screenshot.mode === "manual"
|
shouldBeActive: Config.screenshot.mode === "manual" && Config.screenshot.shadow
|
||||||
step: 1
|
step: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user