Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix setting alignment baseline's default value.

Wolthera van Hövell tot Westerflier3b7638d54c3a
diff --git a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml
index ec2a279166..146831ef0c 100644
--- a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml
+++ b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml
@@ -26,6 +26,7 @@ TextPropertyBase {
}
function onAlignmentBaselineStateChanged() {
+ updateAlignmentBaseline();
updateVisibility();
}
}
@@ -45,7 +46,8 @@ TextPropertyBase {
}
onBaselineSelectionChanged: {
- baselineCmb.currentIndex = baselineCmb.indexOfValue(baselineSelection);
+ let idx = baselineCmb.indexOfValue(baselineSelection);
+ baselineCmb.currentIndex = idx > 0? idx: 0;
if (!blockSignals) {
properties.alignmentBaseline = baselineSelection;
}
@@ -77,7 +79,7 @@ TextPropertyBase {
}
SqueezedComboBox {
model: [
- {text: i18nc("@label:inlistbox", "Baseline"), value: KoSvgText.BaselineAuto, icon: "",
+ {text: i18nc("@label:inlistbox", "Baseline"), value: KoSvgText.BaselineDominant, icon: "",
toolTip: i18nc("@info:tooltip", "Align to the baseline defined by Dominant Baseline.")},
{text: i18nc("@label:inlistbox", "Alphabetic"), value: KoSvgText.BaselineAlphabetic, icon: "qrc:///baseline-alphabetic.svg",
toolTip: i18nc("@info:tooltip", "Align to the baseline for scripts that align at the bottom.")},