Skip to content

Commit

Permalink
[qt6][ImageGallery] IntrinsicDisplay: Harmonize naming of components
Browse files Browse the repository at this point in the history
  • Loading branch information
cbentejac committed Jun 17, 2024
1 parent 6bf0dd9 commit cbe8d77
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions meshroom/ui/qml/ImageGallery/IntrinsicDisplayDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ RowLayout {
if (!attribute)
return undefined
switch (attribute.type) {
case "ChoiceParam": return choice_component
case "IntParam": return int_component
case "FloatParam": return float_component
case "BoolParam": return bool_component
case "StringParam": return textField_component
case "ChoiceParam": return choiceComponent
case "IntParam": return intComponent
case "FloatParam": return floatComponent
case "BoolParam": return boolComponent
case "StringParam": return textFieldComponent
default: return undefined
}
}
Expand All @@ -62,7 +62,7 @@ RowLayout {
}

Component {
id: textField_component
id: textFieldComponent
TextInput {
text: attribute.value
width: intrinsicModel.columnWidths[columnIndex]
Expand All @@ -81,14 +81,14 @@ RowLayout {
_reconstruction.setAttribute(attribute, text)
}
Component.onDestruction: {
if(activeFocus)
if (activeFocus)
_reconstruction.setAttribute(attribute, text)
}
}
}

Component {
id: int_component
id: intComponent

TextInput {
text: model.display.value
Expand Down Expand Up @@ -121,7 +121,7 @@ RowLayout {
}

Component {
id: choice_component
id: choiceComponent
ComboBox {
id: combo
model: attribute.desc !== undefined ? attribute.desc.values : undefined
Expand All @@ -146,7 +146,7 @@ RowLayout {
}

Component {
id: bool_component
id: boolComponent
CheckBox {
checked: attribute ? attribute.value : false
padding: 12
Expand All @@ -156,7 +156,7 @@ RowLayout {
}

Component {
id: float_component
id: floatComponent
TextInput {
readonly property real formattedValue: attribute.value.toFixed(2)
property string displayValue: String(formattedValue)
Expand All @@ -179,9 +179,9 @@ RowLayout {

autoScroll: activeFocus

//Use this function to ensure the left part is visible
//while keeping the trick for formatting the text
//Timing issues otherwise
// Use this function to ensure the left part is visible
// while keeping the trick for formatting the text
// Timing issues otherwise
onActiveFocusChanged: {
if (activeFocus)
text = String(attribute.value)
Expand Down

0 comments on commit cbe8d77

Please sign in to comment.