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++
Use unique icon and italics for tristate.
Wolthera van Hövell tot Westerflier7da3ce13f8d9
diff --git a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml b/plugins/dockers/textproperties/qml/AlignmentBaseline.qmlindex c07a2744d8..669a1371e3 100644--- a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml+++ b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml@@ -47,6 +47,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.alignmentBaselineState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -71,6 +72,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: baselineSelection = currentValue;+ wheelEnabled: true;}}}diff --git a/plugins/dockers/textproperties/qml/BaselineShift.qml b/plugins/dockers/textproperties/qml/BaselineShift.qmlindex ff2ad693a7..eb434394dd 100644--- a/plugins/dockers/textproperties/qml/BaselineShift.qml+++ b/plugins/dockers/textproperties/qml/BaselineShift.qml@@ -52,6 +52,9 @@ TextPropertyBase {onEnableProperty: properties.baselineShiftState = KoSvgTextPropertiesModel.PropertySet;+ Component.onCompleted: {+ mainWindow.connectAutoEnabler(baselineShiftSpnArea);+ }GridLayout {columns: 3;columnSpacing: columnSpacing;@@ -67,6 +70,7 @@ TextPropertyBase {elide: Text.ElideRight;Layout.fillWidth: true;Layout.columnSpan: 2;+ font.italic: properties.baselineShiftState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -88,24 +92,33 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: baselineShiftMode = currentValue;+ wheelEnabled: true;}Item {width: firstColumnWidth;height: 1;}- DoubleSpinBox {- id: baselineShiftSpn++ MouseArea {+ id: baselineShiftSpnArea;+ function autoEnable() {+ baselineShiftMode = 3;+ }Layout.fillWidth: true;- enabled: baselineShiftMode == 3;- from: -999 * multiplier;- to: 999 * multiplier;+ Layout.fillHeight: true;+ DoubleSpinBox {+ id: baselineShiftSpn+ width: parent.width;+ enabled: baselineShiftMode == 3;+ from: -999 * multiplier;+ to: 999 * multiplier;+ }}UnitComboBox {id: baselineShiftUnitCmb;spinBoxControl: baselineShiftSpn;- Layout.fillWidth: true;}}}diff --git a/plugins/dockers/textproperties/qml/Direction.qml b/plugins/dockers/textproperties/qml/Direction.qmlindex 6886bb9c64..0b0496048d 100644--- a/plugins/dockers/textproperties/qml/Direction.qml+++ b/plugins/dockers/textproperties/qml/Direction.qml@@ -60,6 +60,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.directionState === KoSvgTextPropertiesModel.PropertyTriState;}ComboBox {@@ -72,6 +73,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: direction = currentValue;+ wheelEnabled: true;}RevertPropertyButton {@@ -85,6 +87,7 @@ TextPropertyBase {elide: Text.ElideRight;Layout.fillWidth: true;visible: parentPropertyType === TextPropertyBase.Character;+ font.italic: properties.unicodeBidiState === KoSvgTextPropertiesModel.PropertyTriState;}ComboBox {@@ -102,6 +105,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: unicodeBidi = currentValue;+ wheelEnabled: true;}}}diff --git a/plugins/dockers/textproperties/qml/DominantBaseline.qml b/plugins/dockers/textproperties/qml/DominantBaseline.qmlindex 79c11dbb81..ba58d2c9cd 100644--- a/plugins/dockers/textproperties/qml/DominantBaseline.qml+++ b/plugins/dockers/textproperties/qml/DominantBaseline.qml@@ -47,6 +47,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.dominantBaselineState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -71,6 +72,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: baselineSelection = currentValue;+ wheelEnabled: true;}}}diff --git a/plugins/dockers/textproperties/qml/FontFamily.qml b/plugins/dockers/textproperties/qml/FontFamily.qmlindex 885b6486f0..dd6abc1835 100644--- a/plugins/dockers/textproperties/qml/FontFamily.qml+++ b/plugins/dockers/textproperties/qml/FontFamily.qml@@ -45,6 +45,7 @@ CollapsibleGroupProperty {fontFamilies[0] = currentText;}}+ wheelEnabled: true;}onEnableProperty: properties.fontFamiliesState = KoSvgTextPropertiesModel.PropertySet;diff --git a/plugins/dockers/textproperties/qml/FontSize.qml b/plugins/dockers/textproperties/qml/FontSize.qmlindex 1dbc91cc63..c89cbd11b3 100644--- a/plugins/dockers/textproperties/qml/FontSize.qml+++ b/plugins/dockers/textproperties/qml/FontSize.qml@@ -53,6 +53,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.fontSizeState === KoSvgTextPropertiesModel.PropertyTriState;}DoubleSpinBox {diff --git a/plugins/dockers/textproperties/qml/FontStyle.qml b/plugins/dockers/textproperties/qml/FontStyle.qmlindex 6ad0451bdd..af14157ca1 100644--- a/plugins/dockers/textproperties/qml/FontStyle.qml+++ b/plugins/dockers/textproperties/qml/FontStyle.qml@@ -36,13 +36,9 @@ CollapsibleGroupProperty {fontSlant = properties.fontStyle;visible = properties.fontWeightState !== KoSvgTextPropertiesModel.PropertyUnset|| properties.fontStyleState !== KoSvgTextPropertiesModel.PropertyUnset- || properties.fontWidthState !== KoSvgTextPropertiesModel.PropertyUnset;+ || properties.fontWidthState !== KoSvgTextPropertiesModel.PropertyUnset+ || properties.fontOpticalSizeLinkState !== KoSvgTextPropertiesModel.PropertyUnset;blockSignals = false;-- fontWeightSpn.enabled = properties.fontWeightState !== KoSvgTextPropertiesModel.PropertyTriState;- fontStretchSpn.enabled = properties.fontWidthState !== KoSvgTextPropertiesModel.PropertyTriState;- fontSlantCmb.enabled = properties.fontStyleState !== KoSvgTextPropertiesModel.PropertyTriState;- opticalSizeCbx.enabled = properties.fontOpticalSizeLinkState !== KoSvgTextPropertiesModel.PropertyTriState;}onFontWeightChanged: {if (!blockSignals) {@@ -66,13 +62,6 @@ CollapsibleGroupProperty {properties.fontWeightState = KoSvgTextPropertiesModel.PropertySet;}- Component.onCompleted: {- mainWindow.connectAutoEnabler(fontWeightArea);- mainWindow.connectAutoEnabler(fontStretchArea);- mainWindow.connectAutoEnabler(fontSlantArea);- mainWindow.connectAutoEnabler(fontOpticalArea);- }-titleItem: ComboBox {id: styleCmb;Layout.fillWidth: true;@@ -95,26 +84,19 @@ CollapsibleGroupProperty {horizontalAlignment: Text.AlignRight;Layout.preferredWidth: implicitWidth;elide: Text.ElideRight;+ font.italic: properties.fontWeightState === KoSvgTextPropertiesModel.PropertyTriState;}- MouseArea {- id: fontWeightArea;- function autoEnable() {- fontWeightSpn.enabled = true;- }- Layout.fillWidth: true;- Layout.fillHeight: true;- SpinBox {- id: fontWeightSpn- from: 0;- to: 1000;- editable: true;- width: parent.width;+ SpinBox {+ id: fontWeightSpn+ from: 0;+ to: 1000;+ editable: true;+ Layout.fillWidth: true;- wheelEnabled: true;+ wheelEnabled: true;- }}@@ -128,23 +110,15 @@ CollapsibleGroupProperty {horizontalAlignment: Text.AlignRight;Layout.preferredWidth: implicitWidth;elide: Text.ElideRight;+ font.italic: properties.fontWidthState === KoSvgTextPropertiesModel.PropertyTriState;}-- MouseArea {- id: fontStretchArea;- function autoEnable() {- fontStretchSpn.enabled = true;- }+ SpinBox {+ id: fontStretchSpn+ from: 0;+ to: 200;+ editable: true;Layout.fillWidth: true;- Layout.fillHeight: true;- SpinBox {- id: fontStretchSpn- from: 0;- to: 200;- editable: true;- width: parent.width;- wheelEnabled: true;- }+ wheelEnabled: true;}RevertPropertyButton {@@ -157,29 +131,21 @@ CollapsibleGroupProperty {horizontalAlignment: Text.AlignRight;Layout.preferredWidth: implicitWidth;elide: Text.ElideRight;+ font.italic: properties.fontStyleState === KoSvgTextPropertiesModel.PropertyTriState;}- MouseArea {- id: fontSlantArea;- function autoEnable() {- fontSlantCmb.enabled = true;- }- Layout.fillWidth: true;- Layout.fillHeight: true;- ComboBox {- id: fontSlantCmb- model: [- {text: i18nc("@label:inlistbox", "Normal"), value: KoSvgTextPropertiesModel.StyleNormal},- {text: i18nc("@label:inlistbox", "Italic"), value: KoSvgTextPropertiesModel.StyleItalic},- {text: i18nc("@label:inlistbox", "Oblique"), value: KoSvgTextPropertiesModel.StyleOblique}- ]- Layout.fillWidth: true- textRole: "text";- valueRole: "value";- onActivated: fontSlant = currentValue;- wheelEnabled: true;- width: parent.width;- }+ ComboBox {+ id: fontSlantCmb+ model: [+ {text: i18nc("@label:inlistbox", "Normal"), value: KoSvgTextPropertiesModel.StyleNormal},+ {text: i18nc("@label:inlistbox", "Italic"), value: KoSvgTextPropertiesModel.StyleItalic},+ {text: i18nc("@label:inlistbox", "Oblique"), value: KoSvgTextPropertiesModel.StyleOblique}+ ]+ Layout.fillWidth: true+ textRole: "text";+ valueRole: "value";+ onActivated: fontSlant = currentValue;+ wheelEnabled: true;}RevertPropertyButton {@@ -189,18 +155,12 @@ CollapsibleGroupProperty {Item {width: 1;height: 1;}- MouseArea {- id: fontOpticalArea;- function autoEnable() {- opticalSizeCbx.enabled = true;- }- Layout.fillWidth: true;- Layout.fillHeight: true;+CheckBox {id: opticalSizeCbxtext: i18nc("@option:check", "Optical Size")- width: parent.width;- }+ Layout.fillWidth: true;+ font.italic: properties.fontOpticalSizeLinkState === KoSvgTextPropertiesModel.PropertyTriState;}}diff --git a/plugins/dockers/textproperties/qml/HangingPunctuation.qml b/plugins/dockers/textproperties/qml/HangingPunctuation.qmlindex 556352b2f7..4a2258a687 100644--- a/plugins/dockers/textproperties/qml/HangingPunctuation.qml+++ b/plugins/dockers/textproperties/qml/HangingPunctuation.qml@@ -63,6 +63,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.hangingPunctuationState === KoSvgTextPropertiesModel.PropertyTriState;}Item {@@ -96,6 +97,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: hangComma = currentValue;+ wheelEnabled: true;}Item {diff --git a/plugins/dockers/textproperties/qml/LetterSpacing.qml b/plugins/dockers/textproperties/qml/LetterSpacing.qmlindex 6584976d75..b618a87bc0 100644--- a/plugins/dockers/textproperties/qml/LetterSpacing.qml+++ b/plugins/dockers/textproperties/qml/LetterSpacing.qml@@ -53,6 +53,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.letterSpacingState === KoSvgTextPropertiesModel.PropertyTriState;}DoubleSpinBox {diff --git a/plugins/dockers/textproperties/qml/LineBreak.qml b/plugins/dockers/textproperties/qml/LineBreak.qmlindex 7a2bd5a451..e1127d2da9 100644--- a/plugins/dockers/textproperties/qml/LineBreak.qml+++ b/plugins/dockers/textproperties/qml/LineBreak.qml@@ -47,6 +47,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.lineBreakState === KoSvgTextPropertiesModel.PropertyTriState;}ComboBox {diff --git a/plugins/dockers/textproperties/qml/LineHeight.qml b/plugins/dockers/textproperties/qml/LineHeight.qmlindex 074342505d..d449fc9e81 100644--- a/plugins/dockers/textproperties/qml/LineHeight.qml+++ b/plugins/dockers/textproperties/qml/LineHeight.qml@@ -48,6 +48,10 @@ TextPropertyBase {onEnableProperty: properties.lineHeightState = KoSvgTextPropertiesModel.PropertySet;+ Component.onCompleted: {+ mainWindow.connectAutoEnabler(lineHeightSpnArea);+ }+GridLayout {columns: 3;columnSpacing: columnSpacing;@@ -62,6 +66,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.lineHeightState === KoSvgTextPropertiesModel.PropertyTriState;}CheckBox {@@ -76,12 +81,20 @@ TextPropertyBase {width: firstColumnWidth;height: 1;}- DoubleSpinBox {- id: lineHeightSpn+ MouseArea {+ id: lineHeightSpnArea;+ function autoEnable() {+ lineHeightNormalCbx.checked = false;+ }Layout.fillWidth: true;- enabled: !lineHeightNormalCbx.enabled;- from: 0;- to: 999 * multiplier;+ Layout.fillHeight: true;+ DoubleSpinBox {+ id: lineHeightSpn+ width: parent.width;+ enabled: !lineHeightNormalCbx.checked;+ from: 0;+ to: 999 * multiplier;+ }}ComboBox {@@ -96,7 +109,8 @@ TextPropertyBase {]textRole: "text";valueRole: "value";- enabled: !lineHeightNormalCbx.enabled;+ enabled: !lineHeightNormalCbx.checked;+ wheelEnabled: true;onActivated: {var currentValueInPt = 0;diff --git a/plugins/dockers/textproperties/qml/RevertPropertyButton.qml b/plugins/dockers/textproperties/qml/RevertPropertyButton.qmlindex 806b6a56dc..13754c2c5d 100644--- a/plugins/dockers/textproperties/qml/RevertPropertyButton.qml+++ b/plugins/dockers/textproperties/qml/RevertPropertyButton.qml@@ -15,15 +15,23 @@ Item {property bool inheritable: true;signal clicked;++ToolButton {+ property string tristateText: i18nc("@info:tooltip", "Revert property. Within the current selection, this property has different values.")+ property string setText: i18nc("@info:tooltip", "Revert property.");id: revert;icon.width: 22;icon.height: 22;- icon.color: /*revertState === KoSvgTextPropertiesModel.PropertyTriState? sysPalette.highlight:*/ sysPalette.text;+ icon.color: sysPalette.text;enabled: revertState !== KoSvgTextPropertiesModel.PropertyUnset && revertState !== KoSvgTextPropertiesModel.PropertyInherited;opacity: enabled? 1.0: 0.3;- display: AbstractButton.IconOnly- icon.source: parent.inheritable? revertState === KoSvgTextPropertiesModel.PropertyTriState? "qrc:///light_edit-undo-tristate.svg": "qrc:///light_edit-undo.svg": "qrc:///22_light_trash-empty.svg";+ display: AbstractButton.IconOnly;+ icon.source: revertState === KoSvgTextPropertiesModel.PropertyTriState? "qrc:///light_edit-undo-tristate.svg": "qrc:///light_edit-undo.svg";onClicked: parent.clicked();++ ToolTip.text: revertState === KoSvgTextPropertiesModel.PropertyTriState? tristateText: setText;+ ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval;+ ToolTip.visible: hovered;}}diff --git a/plugins/dockers/textproperties/qml/TabSize.qml b/plugins/dockers/textproperties/qml/TabSize.qmlindex 31b75438ad..d5dd203db8 100644--- a/plugins/dockers/textproperties/qml/TabSize.qml+++ b/plugins/dockers/textproperties/qml/TabSize.qml@@ -56,6 +56,7 @@ TextPropertyBase {Layout.columnSpan: 2;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.tabSizeState === KoSvgTextPropertiesModel.PropertyTriState;}Item {@@ -81,6 +82,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";Layout.fillWidth: true;+ wheelEnabled: true;onActivated: {if (currentValue === TabSizeModel.Spaces) {diff --git a/plugins/dockers/textproperties/qml/TextAlign.qml b/plugins/dockers/textproperties/qml/TextAlign.qmlindex 724c6eef07..204bcf387f 100644--- a/plugins/dockers/textproperties/qml/TextAlign.qml+++ b/plugins/dockers/textproperties/qml/TextAlign.qml@@ -69,6 +69,7 @@ CollapsibleGroupProperty {Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;elide: Text.ElideRight;Layout.maximumWidth: implicitWidth;+ font.italic: properties.textAlignAllState === KoSvgTextPropertiesModel.PropertyTriState;}ComboBox {@@ -85,6 +86,7 @@ CollapsibleGroupProperty {textRole: "text";valueRole: "value";onActivated: textAlignAll = currentValue;+ wheelEnabled: true;}RevertPropertyButton {@@ -96,6 +98,7 @@ CollapsibleGroupProperty {Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;elide: Text.ElideRight;Layout.preferredWidth: implicitWidth;+ font.italic: properties.textAlignLastState === KoSvgTextPropertiesModel.PropertyTriState;}ComboBox {@@ -112,6 +115,7 @@ CollapsibleGroupProperty {textRole: "text";valueRole: "value";onActivated: textAlignLast = currentValue;+ wheelEnabled: true;}@@ -124,6 +128,7 @@ CollapsibleGroupProperty {Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;elide: Text.ElideRight;Layout.preferredWidth: implicitWidth;+ font.italic: properties.textAnchorState === KoSvgTextPropertiesModel.PropertyTriState;}ComboBox {@@ -136,6 +141,7 @@ CollapsibleGroupProperty {textRole: "text";valueRole: "value";onActivated: textAnchor = currentValue;+ wheelEnabled: true;}}diff --git a/plugins/dockers/textproperties/qml/TextDecoration.qml b/plugins/dockers/textproperties/qml/TextDecoration.qmlindex 0b50343778..4d116b46fb 100644--- a/plugins/dockers/textproperties/qml/TextDecoration.qml+++ b/plugins/dockers/textproperties/qml/TextDecoration.qml@@ -79,6 +79,7 @@ TextPropertyBase {Layout.columnSpan: 2;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.textDecorationLineState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -161,6 +162,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: lineStyle = currentValue;+ wheelEnabled: true;}}}diff --git a/plugins/dockers/textproperties/qml/TextTransform.qml b/plugins/dockers/textproperties/qml/TextTransform.qmlindex ee2a1ecbb0..8b7019720c 100644--- a/plugins/dockers/textproperties/qml/TextTransform.qml+++ b/plugins/dockers/textproperties/qml/TextTransform.qml@@ -64,6 +64,7 @@ TextPropertyBase {Layout.columnSpan: 2;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.textTransformState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -88,6 +89,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: capitals = currentValue;+ wheelEnabled: true;}Item {diff --git a/plugins/dockers/textproperties/qml/UnitComboBox.qml b/plugins/dockers/textproperties/qml/UnitComboBox.qmlindex b0a01197ef..92728030e9 100644--- a/plugins/dockers/textproperties/qml/UnitComboBox.qml+++ b/plugins/dockers/textproperties/qml/UnitComboBox.qml@@ -11,6 +11,7 @@ ComboBox {property QtObject spinBoxControl;property bool isFontSize: false;property int comboBoxUnit;+ wheelEnabled: true;model: [{text: i18nc("@label:inlistbox", "Pt"), value: 0},diff --git a/plugins/dockers/textproperties/qml/WordBreak.qml b/plugins/dockers/textproperties/qml/WordBreak.qmlindex 38d9d1db0f..4905797b83 100644--- a/plugins/dockers/textproperties/qml/WordBreak.qml+++ b/plugins/dockers/textproperties/qml/WordBreak.qml@@ -47,6 +47,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.wordBreakState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -61,6 +62,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: breakType = currentValue;+ wheelEnabled: true;}}}diff --git a/plugins/dockers/textproperties/qml/WordSpacing.qml b/plugins/dockers/textproperties/qml/WordSpacing.qmlindex 434a9742ae..470804e501 100644--- a/plugins/dockers/textproperties/qml/WordSpacing.qml+++ b/plugins/dockers/textproperties/qml/WordSpacing.qml@@ -54,6 +54,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.wordSpacingState === KoSvgTextPropertiesModel.PropertyTriState;}DoubleSpinBox {diff --git a/plugins/dockers/textproperties/qml/WritingMode.qml b/plugins/dockers/textproperties/qml/WritingMode.qmlindex c022abb256..3ac3b10ea8 100644--- a/plugins/dockers/textproperties/qml/WritingMode.qml+++ b/plugins/dockers/textproperties/qml/WritingMode.qml@@ -46,6 +46,7 @@ TextPropertyBase {text: propertyName;elide: Text.ElideRight;Layout.fillWidth: true;+ font.italic: properties.writingModeState === KoSvgTextPropertiesModel.PropertyTriState;}@@ -60,6 +61,7 @@ TextPropertyBase {textRole: "text";valueRole: "value";onActivated: writingMode = currentValue;+ wheelEnabled: true;}}}