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++
Allow adding properties once they've been removed and hide irrelevant properties.
Wolthera van Hövell tot Westerflier2bb0ea60e20c
diff --git a/plugins/dockers/textproperties/TextPropertiesDock.cpp b/plugins/dockers/textproperties/TextPropertiesDock.cppindex 982e084cdb..bb8a7ee113 100644--- a/plugins/dockers/textproperties/TextPropertiesDock.cpp+++ b/plugins/dockers/textproperties/TextPropertiesDock.cpp@@ -146,6 +146,7 @@ void TextPropertiesDock::slotTextPropertiesChanged()KoSvgTextPropertyData textData = d->textModel->textData.get();qDebug() << Q_FUNC_INFO << textData;if (d->provider && d->provider->textPropertyData() != textData) {+ QMetaObject::invokeMethod(m_quickWidget->rootObject(), "setProperties");d->provider->setTextPropertyData(textData);}}diff --git a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml b/plugins/dockers/textproperties/qml/AlignmentBaseline.qmlindex 568dceddcd..13e7c75750 100644--- a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml+++ b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml@@ -9,11 +9,13 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:listbox", "Alignment Baseline:");property int baselineSelection;onPropertiesUpdated: {blockSignals = true;baselineSelection = properties.alignmentBaseline;+ visible = properties.alignmentBaselineState !== KoSvgTextPropertiesModel.PropertyUnsetblockSignals = false;}@@ -35,7 +37,7 @@ TextPropertyBase {}Label {- text: i18nc("@label:listbox", "Alignment Baseline:")+ text: propertyName;}diff --git a/plugins/dockers/textproperties/qml/BaselineShift.qml b/plugins/dockers/textproperties/qml/BaselineShift.qmlindex 0640346b00..ae892fc7f8 100644--- a/plugins/dockers/textproperties/qml/BaselineShift.qml+++ b/plugins/dockers/textproperties/qml/BaselineShift.qml@@ -9,6 +9,8 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label", "Baseline-Shift")+property alias baselineShiftValue: baselineShiftSpn.value;property int baselineShiftMode;@@ -16,6 +18,7 @@ TextPropertyBase {blockSignals = true;baselineShiftValue = properties.baselineShiftValue.value;baselineShiftMode = properties.baselineShiftMode;+ visible = properties.baselineShiftState !== KoSvgTextPropertiesModel.PropertyUnsetblockSignals = false;}@@ -44,7 +47,7 @@ TextPropertyBase {}Label {- text: i18nc("@label", "Baseline-Shift:")+ text: propertyNameLayout.columnSpan: 2;}diff --git a/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml b/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qmlindex 90c77c3af8..e7b464c5b9 100644--- a/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml+++ b/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml@@ -9,7 +9,6 @@ import QtQuick.Controls 2.15TextPropertyBase {id: root;- property alias propertyName: propertyTitle.text;property alias contentItem: contentItemContainer.data;property alias titleItem: titleItemContainer.data;spacing: columnSpacing;@@ -50,7 +49,7 @@ TextPropertyBase {spacing: columnSpacing;Label {id: propertyTitle;- text: "property name";+ text: root.propertyName;height: parent.height;verticalAlignment: Text.AlignVCentercolor: sysPalette.text;diff --git a/plugins/dockers/textproperties/qml/Direction.qml b/plugins/dockers/textproperties/qml/Direction.qmlindex d4f98e5dcf..2a8da334f9 100644--- a/plugins/dockers/textproperties/qml/Direction.qml+++ b/plugins/dockers/textproperties/qml/Direction.qml@@ -9,11 +9,13 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:listbox", "Direction")property int direction;onPropertiesUpdated: {blockSignals = true;direction = properties.direction;+ visible = properties.directionState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -35,7 +37,7 @@ TextPropertyBase {}Label {- text: i18nc("@label:listbox", "Direction:");+ text: propertyName;}ComboBox {diff --git a/plugins/dockers/textproperties/qml/DominantBaseline.qml b/plugins/dockers/textproperties/qml/DominantBaseline.qmlindex decc2c9f9b..71390eac30 100644--- a/plugins/dockers/textproperties/qml/DominantBaseline.qml+++ b/plugins/dockers/textproperties/qml/DominantBaseline.qml@@ -9,11 +9,13 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:listbox", "Dominant Baseline")property int baselineSelectiononPropertiesUpdated: {blockSignals = true;baselineSelection = properties.dominantBaseline;+ visible = properties.dominantBaselineState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -35,7 +37,7 @@ TextPropertyBase {}Label {- text: i18nc("@label:listbox", "Dominant Baseline:")+ text: propertyName;}diff --git a/plugins/dockers/textproperties/qml/FontFamily.qml b/plugins/dockers/textproperties/qml/FontFamily.qmlindex f04924a162..06f2766a14 100644--- a/plugins/dockers/textproperties/qml/FontFamily.qml+++ b/plugins/dockers/textproperties/qml/FontFamily.qml@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0CollapsibleGroupProperty {- propertyName: i18nc("@label", "Font Family:");+ propertyName: i18nc("@label", "Font Family");property var fontFamilies: [];property var fontFamilyModel : [];@@ -17,6 +17,7 @@ CollapsibleGroupProperty {onPropertiesUpdated: {blockSignals = true;fontFamilies = properties.fontFamilies;+ visible = properties.fontFamiliesState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -45,7 +46,7 @@ CollapsibleGroupProperty {columns: 2anchors.left: parent.leftanchors.right: parent.right- columnSpacing: parent.columnSpacing;+ columnSpacing: columnSpacing;RevertPropertyButton {revertEnabled: properties.fontFamiliesState === KoSvgTextPropertiesModel.PropertySet;diff --git a/plugins/dockers/textproperties/qml/FontSize.qml b/plugins/dockers/textproperties/qml/FontSize.qmlindex a8b0d7a860..8347aae665 100644--- a/plugins/dockers/textproperties/qml/FontSize.qml+++ b/plugins/dockers/textproperties/qml/FontSize.qml@@ -9,13 +9,14 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:spinbox", "Font Size");property alias fontSize: fontSizeSpn.value;- visible: properties.fontSizeState !== KoSvgTextPropertiesModel.PropertyUnset;onPropertiesUpdated: {blockSignals = true;fontSize = properties.fontSize.value;+ visible = properties.fontSizeState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}onFontSizeChanged: {@@ -34,11 +35,12 @@ TextPropertyBase {}Label {- text: i18nc("@label:spinbox", "Font Size:")+ text: propertyName}SpinBox {- id: fontSizeSpn+ id: fontSizeSpn;+ editable: true;Layout.fillWidth: true;}@@ -51,6 +53,7 @@ TextPropertyBase {]textRole: "text";valueRole: "value";+ Layout.fillWidth: true;}}}diff --git a/plugins/dockers/textproperties/qml/FontStyle.qml b/plugins/dockers/textproperties/qml/FontStyle.qmlindex 47dfa6cba0..f38c723813 100644--- a/plugins/dockers/textproperties/qml/FontStyle.qml+++ b/plugins/dockers/textproperties/qml/FontStyle.qml@@ -15,10 +15,6 @@ CollapsibleGroupProperty {property alias fontWidth: fontStretchSpn.value;property int fontSlant: KoSvgTextPropertiesModel.StyleNormal;- visible: properties.fontWeightState !== KoSvgTextPropertiesModel.PropertyUnset- || properties.fontStyleState !== KoSvgTextPropertiesModel.PropertyUnset- || properties.fontWidthState !== KoSvgTextPropertiesModel.PropertyUnset;-onFontSlantChanged: {fontSlantCmb.currentIndex = fontSlantCmb.indexOfValue(fontSlant);if (!blockSignals) {@@ -33,6 +29,9 @@ CollapsibleGroupProperty {fontWidth = properties.fontWidth;fontOptical = properties.fontOpticalSizeLink;fontSlant = properties.fontStyle;+ visible = properties.fontWeightState !== KoSvgTextPropertiesModel.PropertyUnset+ || properties.fontStyleState !== KoSvgTextPropertiesModel.PropertyUnset+ || properties.fontWidthState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}onFontWeightChanged: {@@ -79,6 +78,7 @@ CollapsibleGroupProperty {id: fontWeightSpnfrom: 0;to: 1000;+ editable: true;Layout.fillWidth: true}@@ -97,6 +97,7 @@ CollapsibleGroupProperty {id: fontStretchSpnfrom: 0;to: 200;+ editable: true;Layout.fillWidth: true}diff --git a/plugins/dockers/textproperties/qml/HangingPunctuation.qml b/plugins/dockers/textproperties/qml/HangingPunctuation.qmlindex 045e257018..f77c8c2a15 100644--- a/plugins/dockers/textproperties/qml/HangingPunctuation.qml+++ b/plugins/dockers/textproperties/qml/HangingPunctuation.qml@@ -9,6 +9,7 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label", "Hanging-punctuation");property alias hangStart: paragraphStartCbx.checked;property alias hangEnd: paragraphEndCbx.checked;property int hangComma: KoSvgTextPropertiesModel.NoHang;@@ -18,6 +19,7 @@ TextPropertyBase {hangStart = properties.hangingPunctuationFirst;hangEnd = properties.hangingPunctuationLast;hangComma = properties.hangingPunctuationComma;+ visible = properties.hangingPunctuationState !== KoSvgTextPropertiesModel.PropertySet;blockSignals = false;}@@ -50,7 +52,7 @@ TextPropertyBase {}Label {- text: i18nc("@label", "Hanging-punctuation:")+ text: propertyName;}Item {diff --git a/plugins/dockers/textproperties/qml/LetterSpacing.qml b/plugins/dockers/textproperties/qml/LetterSpacing.qmlindex c57442fa6b..6e906da44c 100644--- a/plugins/dockers/textproperties/qml/LetterSpacing.qml+++ b/plugins/dockers/textproperties/qml/LetterSpacing.qml@@ -9,12 +9,13 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:spinbox", "Letter Spacing");property alias letterSpacing: letterSpacingSpn.value;- visible: properties.letterSpacingState !== KoSvgTextPropertiesModel.PropertyUnset;onPropertiesUpdated: {blockSignals = true;letterSpacing = properties.letterSpacing.value;+ visible = properties.letterSpacingState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}onLetterSpacingChanged: {@@ -32,17 +33,19 @@ TextPropertyBase {onClicked: properties.letterSpacingState = KoSvgTextPropertiesModel.PropertyUnset;}- Label {- text: i18nc("@label:spinbox", "Letter Spacing:")- }+ Label {+ text: propertyName+ }- SpinBox {- id: letterSpacingSpn- Layout.fillWidth: true;- }+ SpinBox {+ id: letterSpacingSpn+ editable: true;+ Layout.fillWidth: true;+ }- ComboBox {- model: ["Pt", "Em", "Ex"]- }+ ComboBox {+ model: ["Pt", "Em", "Ex"];+ Layout.fillWidth: true;+ }}}diff --git a/plugins/dockers/textproperties/qml/LineBreak.qml b/plugins/dockers/textproperties/qml/LineBreak.qmlindex 135c44fc14..04ebeac56b 100644--- a/plugins/dockers/textproperties/qml/LineBreak.qml+++ b/plugins/dockers/textproperties/qml/LineBreak.qml@@ -10,11 +10,13 @@ import org.krita.flake.text 1.0TextPropertyBase {property int breakType;- visible: properties.lineBreakState !== KoSvgTextPropertiesModel.PropertyUnset;++ propertyName: i18nc("@label:listbox", "Line Break");onPropertiesUpdated: {blockSignals = true;breakType = properties.lineBreak;+ visible = properties.lineBreakState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -35,7 +37,7 @@ TextPropertyBase {}Label {- text: i18nc("@label:listbox", "Line Break:")+ text: propertyName;}ComboBox {diff --git a/plugins/dockers/textproperties/qml/LineHeight.qml b/plugins/dockers/textproperties/qml/LineHeight.qmlindex 777ca9e14a..61f50aad1f 100644--- a/plugins/dockers/textproperties/qml/LineHeight.qml+++ b/plugins/dockers/textproperties/qml/LineHeight.qml@@ -9,16 +9,17 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label", "Line Height");property alias isNormal: lineHeightNormalCbx.checked;property alias lineHeight: lineHeightSpn.value;property int lineHeightUnit: LineHeightModel.Lines;- visible: properties.lineHeightState !== KoSvgTextPropertiesModel.PropertyUnset;onPropertiesUpdated: {blockSignals = true;isNormal = properties.lineHeight.isNormal;lineHeight = properties.lineHeight.value;lineHeightUnit = properties.lineHeight.unit;+ visible = properties.lineHeightState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -51,7 +52,7 @@ TextPropertyBase {}Label {- text: i18nc("@label", "Line Height:")+ text: propertyName;Layout.columnSpan: 2;}diff --git a/plugins/dockers/textproperties/qml/TabSize.qml b/plugins/dockers/textproperties/qml/TabSize.qmlindex 5f2f66d088..5324ab95e6 100644--- a/plugins/dockers/textproperties/qml/TabSize.qml+++ b/plugins/dockers/textproperties/qml/TabSize.qml@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {-+ propertyName: i18nc("@title:group", "Tab Size");property alias tabSize: tabSizeSpn.value;property int tabSizeUnit: TabSizeModel.Spaces;@@ -17,6 +17,7 @@ TextPropertyBase {blockSignals = true;tabSize = properties.tabSize.value;tabSizeUnit = properties.tabSize.unit;+ visible = properties.tabSizeState !== KoSvgTextPropertiesModel.PropertySet;blockSignals = false;}@@ -44,7 +45,7 @@ TextPropertyBase {onClicked: properties.tabSizeState = KoSvgTextPropertiesModel.PropertyUnset;}Label {- text: i18nc("@title:group", "Tab Size:")+ text: propertyNameLayout.columnSpan: 2;Layout.fillWidth: true;}diff --git a/plugins/dockers/textproperties/qml/TextAlign.qml b/plugins/dockers/textproperties/qml/TextAlign.qmlindex 510edf074b..e1f6d1518c 100644--- a/plugins/dockers/textproperties/qml/TextAlign.qml+++ b/plugins/dockers/textproperties/qml/TextAlign.qml@@ -20,6 +20,9 @@ CollapsibleGroupProperty {textAlignAll = properties.textAlignAll;textAlignLast = properties.textAlignLast;textAnchor = properties.textAnchor;+ visible = properties.textAlignAllState !== KoSvgTextPropertiesModel.PropertyUnset ||+ properties.textAlignLastState !== KoSvgTextPropertiesModel.PropertyUnset ||+ properties.textAnchorState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}diff --git a/plugins/dockers/textproperties/qml/TextDecoration.qml b/plugins/dockers/textproperties/qml/TextDecoration.qmlindex 4b067fcbac..450ec8bc4a 100644--- a/plugins/dockers/textproperties/qml/TextDecoration.qml+++ b/plugins/dockers/textproperties/qml/TextDecoration.qml@@ -9,6 +9,8 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@title:group", "Text Decoration");+ visible: properties.textDecorationLineState !== KoSvgTextPropertiesModel.PropertyUnsetproperty alias underline: underlineCbx.checked;property alias overline: overlineCbx.checked;@@ -63,7 +65,7 @@ TextPropertyBase {}Label {- text: i18nc("@title:group", "Text Decoration:")+ text: propertyName;Layout.columnSpan: 2;}diff --git a/plugins/dockers/textproperties/qml/TextIndent.qml b/plugins/dockers/textproperties/qml/TextIndent.qmlindex 002bb3e35c..09631f8c0b 100644--- a/plugins/dockers/textproperties/qml/TextIndent.qml+++ b/plugins/dockers/textproperties/qml/TextIndent.qml@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0CollapsibleGroupProperty {- propertyName: i18nc("@title:group", "Text Indent:");+ propertyName: i18nc("@title:group", "Text Indent");property alias textIndentValue: textIndentSpn.value;property alias hanging: indentHangingCkb.checked;@@ -20,6 +20,7 @@ CollapsibleGroupProperty {textIndentValue = properties.textIndent.length.value;hanging = properties.textIndent.hanging;eachLine = properties.textIndent.eachLine;+ visible = properties.textIndentState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -50,6 +51,7 @@ CollapsibleGroupProperty {}ComboBox {model: ["Pt", "Em", "Ex"]+ Layout.fillWidth: true;}}diff --git a/plugins/dockers/textproperties/qml/TextProperties.qml b/plugins/dockers/textproperties/qml/TextProperties.qmlindex cacf6b03c8..77b63b6a3e 100644--- a/plugins/dockers/textproperties/qml/TextProperties.qml+++ b/plugins/dockers/textproperties/qml/TextProperties.qml@@ -20,6 +20,32 @@ Rectangle {colorGroup: SystemPalette.Active}+ ListModel {+ id: characterPropertyList;+ }+ ListModel {+ id: paragraphPropertyList;+ }++ Component.onCompleted: fillPropertyModels();++ function fillPropertyModels() {+ for (var i = 0; i < characterPropertiesModel.count; i++) {+ characterPropertyList.append({"name": characterPropertiesModel.get(i).propertyName,+ "tooltip": characterPropertiesModel.get(i).toolTip,+ "searchTerms": characterPropertiesModel.get(i).searchTerms,+ "visible": characterPropertiesModel.get(i).visible,+ "item": characterPropertiesModel.get(i)});+ }+ for (var l = 0; l < paragraphPropertiesModel.count; l++) {+ paragraphPropertyList.append({"name": paragraphPropertiesModel.get(l).propertyName,+ "tooltip": paragraphPropertiesModel.get(l).toolTip,+ "searchTerms": paragraphPropertiesModel.get(l).searchTerms,+ "visible": paragraphPropertiesModel.get(l).visible,+ "item": paragraphPropertiesModel.get(l)});+ }+ }+function setProperties() {for (var i = 0; i < characterPropertiesModel.count; i++) {characterPropertiesModel.get(i).propertiesUpdated();@@ -49,41 +75,45 @@ Rectangle {anchors.left: parent.left;anchors.top: tabs.bottom;- ScrollView {- background: Rectangle {- color: sysPalette.alternateBase;- border.color: sysPalette.base;- border.width: 1;- }- clip: true;- ScrollBar.horizontal.policy: ScrollBar.AlwaysOff-- ListView {- id: characterProperties- model: ObjectModel {- id: characterPropertiesModel;- FontSize {- }- FontFamily {- fontFamilyModel: fontFamiliesModel;- }- FontStyle {- }- LetterSpacing {- }- WordSpacing {- }- LineHeight {- }- LineBreak {- }- WordBreak {- }- TextTransform {- }- TextDecoration {+ ColumnLayout {+ Frame {+ id: characterFrame;+ Layout.fillHeight: true;+ Layout.fillWidth: true;+ clip: true;+ padding: 0;++ ListView {+ id: characterProperties++ anchors.fill: parent;+ ScrollBar.vertical: ScrollBar {}- /*++ model: ObjectModel {+ id: characterPropertiesModel;+ FontSize {+ }+ FontFamily {+ fontFamilyModel: fontFamiliesModel;+ }+ FontStyle {+ }+ LetterSpacing {+ }+ WordSpacing {+ }+ LineHeight {+ }+ LineBreak {+ }+ WordBreak {+ }+ TextTransform {+ }+ TextDecoration {+ }+ /*OTLigatures {}OTPosition {@@ -94,47 +124,75 @@ Rectangle {}OTEastAsian {}*/- BaselineShift {- }- AlignmentBaseline {+ BaselineShift {+ }+ AlignmentBaseline {+ }}}}- }- ScrollView {- background: Rectangle {- color: sysPalette.alternateBase;- border.color: sysPalette.base;- border.width: 1;+ ComboBox {+ Layout.fillWidth: true;+ Layout.minimumHeight: implicitHeight;+ model: characterPropertyList;+ textRole: "name";+ displayText: i18nc("@label:listbox", "Add Property");+ onActivated: {+ model.get(currentIndex).item.visible = true;+ }}- clip: true;- ScrollBar.horizontal.policy: ScrollBar.AlwaysOff- ListView {- id: paragraphProperties- model: ObjectModel {- id: paragraphPropertiesModel;- WritingMode {- }- Direction{- }- TextIndent{- }- TextAlign{- }- DominantBaseline {- }- /*- WhiteSpace {- }- UnderlinePosition {- }*/- HangingPunctuation {+ }++ ColumnLayout {+ Frame {+ Layout.fillHeight: true;+ Layout.fillWidth: true;+ clip: true;+ padding: 0;++ ListView {+ id: paragraphProperties;++ clip: true;+ anchors.fill: parent;+ ScrollBar.vertical: ScrollBar {}- TabSize {++ model: ObjectModel {+ id: paragraphPropertiesModel;+ WritingMode {+ }+ Direction{+ }+ TextIndent{+ }+ TextAlign{+ }+ DominantBaseline {+ }+ /*+ WhiteSpace {+ }+ UnderlinePosition {+ }*/+ HangingPunctuation {+ }+ TabSize {+ }}}}+ ComboBox {+ Layout.fillWidth: true;+ Layout.minimumHeight: implicitHeight;+ model: paragraphPropertyList;+ textRole: "name";+ displayText: i18nc("@label:listbox", "Add Property");+ onActivated: {+ model.get(currentIndex).item.visible = true;+ }+ }}}}diff --git a/plugins/dockers/textproperties/qml/TextPropertyBase.qml b/plugins/dockers/textproperties/qml/TextPropertyBase.qmlindex fc889a99cd..1fea3b3591 100644--- a/plugins/dockers/textproperties/qml/TextPropertyBase.qml+++ b/plugins/dockers/textproperties/qml/TextPropertyBase.qml@@ -18,6 +18,9 @@ Column {signal propertiesUpdated; ///< Used by each text property panel to update the data on the controls.property bool blockSignals; ///< When setting the data on the controls, this needs to be enabled and checked while returning data from the controls.+ property string propertyName;+ property string toolTip;+ property var searchTerms: [];Rectangle {color: sysPalette.base;diff --git a/plugins/dockers/textproperties/qml/TextTransform.qml b/plugins/dockers/textproperties/qml/TextTransform.qmlindex 313a898863..f134757d54 100644--- a/plugins/dockers/textproperties/qml/TextTransform.qml+++ b/plugins/dockers/textproperties/qml/TextTransform.qml@@ -9,6 +9,7 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@title:group", "Text Transform");property alias fullWidth: fullWidthChk.checked;property alias fullSizeKana: fullSizeKanaChk.checked;property int capitals;@@ -18,6 +19,7 @@ TextPropertyBase {fullWidth = properties.textTransform.fullWidth;fullSizeKana = properties.textTransform.fullSizeKana;capitals = properties.textTransform.capitals;+ visible = properties.textTransformState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -51,7 +53,7 @@ TextPropertyBase {}Label {- text: i18nc("@title:group", "Text Transform:")+ text: propertyName;Layout.columnSpan: 2;}diff --git a/plugins/dockers/textproperties/qml/WordBreak.qml b/plugins/dockers/textproperties/qml/WordBreak.qmlindex 18eaf9472e..e6d0eccc53 100644--- a/plugins/dockers/textproperties/qml/WordBreak.qml+++ b/plugins/dockers/textproperties/qml/WordBreak.qml@@ -9,12 +9,14 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:listbox", "Word Break");property int breakType;- visible: properties.wordBreakState !== KoSvgTextPropertiesModel.PropertyUnset;+onPropertiesUpdated: {blockSignals = true;breakType = properties.wordBreak;+ visible = properties.wordBreakState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -35,7 +37,7 @@ TextPropertyBase {}Label {- text: i18nc("@label:listbox", "Word Break:")+ text: propertyName}diff --git a/plugins/dockers/textproperties/qml/WordSpacing.qml b/plugins/dockers/textproperties/qml/WordSpacing.qmlindex f90e5be74b..e4116fb51e 100644--- a/plugins/dockers/textproperties/qml/WordSpacing.qml+++ b/plugins/dockers/textproperties/qml/WordSpacing.qml@@ -9,12 +9,14 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@title:group", "Word Spacing");property alias wordSpacing: wordSpacingSpn.value;visible: properties.wordSpacingState !== KoSvgTextPropertiesModel.PropertyUnset;onPropertiesUpdated: {blockSignals = true;wordSpacing = properties.wordSpacing.value;+ visible = properties.wordSpacingState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}onWordSpacingChanged: {@@ -33,16 +35,18 @@ TextPropertyBase {}Label {- text: i18nc("@title:group", "Word Spacing:")+ text: propertyName}SpinBox {id: wordSpacingSpn+ editable: true;Layout.fillWidth: true;}ComboBox {- model: ["Pt", "Em", "Ex"]+ model: ["Pt", "Em", "Ex"];+ Layout.fillWidth: true;}}}diff --git a/plugins/dockers/textproperties/qml/WritingMode.qml b/plugins/dockers/textproperties/qml/WritingMode.qmlindex 75968776e8..1f13c570a9 100644--- a/plugins/dockers/textproperties/qml/WritingMode.qml+++ b/plugins/dockers/textproperties/qml/WritingMode.qml@@ -9,11 +9,13 @@ import QtQuick.Layouts 1.12import org.krita.flake.text 1.0TextPropertyBase {+ propertyName: i18nc("@label:listbox", "Writing Mode");property int writingMode;onPropertiesUpdated: {blockSignals = true;writingMode = properties.writingMode;+ visible = properties.writingModeState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;}@@ -34,7 +36,7 @@ TextPropertyBase {}Label {- text: i18nc("@label:listbox", "Writing Mode:")+ text: propertyName;}