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++

A whole bunch of tweaks to text properties docker UX to allow better minimizing.

Wolthera van Hövell tot Westerflierfe1460c1f000
diff --git a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml
index 13e7c75750..7dccf059e6 100644
--- a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml
+++ b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml
@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.12
import org.krita.flake.text 1.0
TextPropertyBase {
- propertyName: i18nc("@label:listbox", "Alignment Baseline:");
+ propertyName: i18nc("@label:listbox", "Alignment Baseline");
property int baselineSelection;
onPropertiesUpdated: {
@@ -38,6 +38,8 @@ TextPropertyBase {
Label {
text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
diff --git a/plugins/dockers/textproperties/qml/BaselineShift.qml b/plugins/dockers/textproperties/qml/BaselineShift.qml
index ae892fc7f8..f27dd084f1 100644
--- a/plugins/dockers/textproperties/qml/BaselineShift.qml
+++ b/plugins/dockers/textproperties/qml/BaselineShift.qml
@@ -47,7 +47,9 @@ TextPropertyBase {
}
Label {
- text: propertyName
+ text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
Layout.columnSpan: 2;
}
@@ -59,6 +61,7 @@ TextPropertyBase {
ComboBox {
Layout.columnSpan: 2;
+ Layout.fillWidth: true;
model: [
{ text: i18nc("@label:inlistbox", "None"), value: KoSvgText.ShiftNone},
{ text: i18nc("@label:inlistbox", "Length"), value: KoSvgText.ShiftLengthPercentage},
@@ -82,7 +85,8 @@ TextPropertyBase {
}
ComboBox {
- model: ["Pt", "Em", "Ex"]
+ model: ["Pt", "Em", "Ex"];
+ Layout.fillWidth: true;
}
}
}
diff --git a/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml b/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml
index e7b464c5b9..2fdf6696b8 100644
--- a/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml
+++ b/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml
@@ -53,6 +53,8 @@ TextPropertyBase {
height: parent.height;
verticalAlignment: Text.AlignVCenter
color: sysPalette.text;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
}
diff --git a/plugins/dockers/textproperties/qml/Direction.qml b/plugins/dockers/textproperties/qml/Direction.qml
index 2a8da334f9..97892b308c 100644
--- a/plugins/dockers/textproperties/qml/Direction.qml
+++ b/plugins/dockers/textproperties/qml/Direction.qml
@@ -38,6 +38,8 @@ TextPropertyBase {
Label {
text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
ComboBox {
diff --git a/plugins/dockers/textproperties/qml/DominantBaseline.qml b/plugins/dockers/textproperties/qml/DominantBaseline.qml
index 71390eac30..4836be5347 100644
--- a/plugins/dockers/textproperties/qml/DominantBaseline.qml
+++ b/plugins/dockers/textproperties/qml/DominantBaseline.qml
@@ -38,6 +38,8 @@ TextPropertyBase {
Label {
text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
diff --git a/plugins/dockers/textproperties/qml/FontSize.qml b/plugins/dockers/textproperties/qml/FontSize.qml
index 8347aae665..75cf2c02f2 100644
--- a/plugins/dockers/textproperties/qml/FontSize.qml
+++ b/plugins/dockers/textproperties/qml/FontSize.qml
@@ -35,7 +35,9 @@ TextPropertyBase {
}
Label {
- text: propertyName
+ text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
SpinBox {
diff --git a/plugins/dockers/textproperties/qml/FontStyle.qml b/plugins/dockers/textproperties/qml/FontStyle.qml
index f38c723813..8f1a0b7180 100644
--- a/plugins/dockers/textproperties/qml/FontStyle.qml
+++ b/plugins/dockers/textproperties/qml/FontStyle.qml
@@ -72,6 +72,8 @@ CollapsibleGroupProperty {
text: i18nc("@label:spinbox", "Weight:")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
horizontalAlignment: Text.AlignRight;
+ Layout.preferredWidth: implicitWidth;
+ elide: Text.ElideRight;
}
SpinBox {
@@ -91,6 +93,8 @@ CollapsibleGroupProperty {
text: i18nc("@label:spinbox", "Width:")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
horizontalAlignment: Text.AlignRight;
+ Layout.preferredWidth: implicitWidth;
+ elide: Text.ElideRight;
}
SpinBox {
@@ -109,6 +113,8 @@ CollapsibleGroupProperty {
text: i18nc("@label:listbox", "Slant:")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
horizontalAlignment: Text.AlignRight;
+ Layout.preferredWidth: implicitWidth;
+ elide: Text.ElideRight;
}
ComboBox {
diff --git a/plugins/dockers/textproperties/qml/HangingPunctuation.qml b/plugins/dockers/textproperties/qml/HangingPunctuation.qml
index f77c8c2a15..4ce06f8f17 100644
--- a/plugins/dockers/textproperties/qml/HangingPunctuation.qml
+++ b/plugins/dockers/textproperties/qml/HangingPunctuation.qml
@@ -53,6 +53,8 @@ TextPropertyBase {
Label {
text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
Item {
diff --git a/plugins/dockers/textproperties/qml/LetterSpacing.qml b/plugins/dockers/textproperties/qml/LetterSpacing.qml
index 6e906da44c..fa3bf41110 100644
--- a/plugins/dockers/textproperties/qml/LetterSpacing.qml
+++ b/plugins/dockers/textproperties/qml/LetterSpacing.qml
@@ -34,7 +34,9 @@ TextPropertyBase {
}
Label {
- text: propertyName
+ text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
SpinBox {
diff --git a/plugins/dockers/textproperties/qml/LineBreak.qml b/plugins/dockers/textproperties/qml/LineBreak.qml
index 04ebeac56b..af3c90ee46 100644
--- a/plugins/dockers/textproperties/qml/LineBreak.qml
+++ b/plugins/dockers/textproperties/qml/LineBreak.qml
@@ -38,6 +38,8 @@ TextPropertyBase {
Label {
text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
ComboBox {
diff --git a/plugins/dockers/textproperties/qml/LineHeight.qml b/plugins/dockers/textproperties/qml/LineHeight.qml
index 61f50aad1f..9af426b96c 100644
--- a/plugins/dockers/textproperties/qml/LineHeight.qml
+++ b/plugins/dockers/textproperties/qml/LineHeight.qml
@@ -53,17 +53,11 @@ TextPropertyBase {
Label {
text: propertyName;
- Layout.columnSpan: 2;
- }
-
-
- Item {
- width: firstColumnWidth;
- height: 1;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
CheckBox {
- Layout.columnSpan: 2;
text: i18nc("@option:check", "Normal")
id: lineHeightNormalCbx;
onCheckedChanged: {
diff --git a/plugins/dockers/textproperties/qml/TabSize.qml b/plugins/dockers/textproperties/qml/TabSize.qml
index 5324ab95e6..bfde0fb4e2 100644
--- a/plugins/dockers/textproperties/qml/TabSize.qml
+++ b/plugins/dockers/textproperties/qml/TabSize.qml
@@ -47,6 +47,7 @@ TextPropertyBase {
Label {
text: propertyName
Layout.columnSpan: 2;
+ elide: Text.ElideRight;
Layout.fillWidth: true;
}
@@ -70,6 +71,7 @@ TextPropertyBase {
textRole: "text";
valueRole: "value";
onActivated: tabSizeUnit = currentValue;
+ Layout.fillWidth: true;
}
}
diff --git a/plugins/dockers/textproperties/qml/TextAlign.qml b/plugins/dockers/textproperties/qml/TextAlign.qml
index e1f6d1518c..a71de6ba9e 100644
--- a/plugins/dockers/textproperties/qml/TextAlign.qml
+++ b/plugins/dockers/textproperties/qml/TextAlign.qml
@@ -59,7 +59,9 @@ CollapsibleGroupProperty {
}
Label {
text: i18nc("@label:listbox", "Text Align:")
- Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;
+ elide: Text.ElideRight;
+ Layout.maximumWidth: implicitWidth;
}
ComboBox {
@@ -84,7 +86,9 @@ CollapsibleGroupProperty {
}
Label {
text: i18nc("@label:listbox", "Align Last:")
- Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;
+ elide: Text.ElideRight;
+ Layout.preferredWidth: implicitWidth;
}
ComboBox {
@@ -110,7 +114,9 @@ CollapsibleGroupProperty {
}
Label {
text: i18nc("@label:listbox", "Text Anchor:")
- Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;
+ elide: Text.ElideRight;
+ Layout.preferredWidth: implicitWidth;
}
ComboBox {
diff --git a/plugins/dockers/textproperties/qml/TextDecoration.qml b/plugins/dockers/textproperties/qml/TextDecoration.qml
index 450ec8bc4a..497bbcf32a 100644
--- a/plugins/dockers/textproperties/qml/TextDecoration.qml
+++ b/plugins/dockers/textproperties/qml/TextDecoration.qml
@@ -67,6 +67,8 @@ TextPropertyBase {
Label {
text: propertyName;
Layout.columnSpan: 2;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
@@ -131,6 +133,9 @@ TextPropertyBase {
}
Label {
text: i18nc("@label:listbox", "Style:")
+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
ComboBox {
diff --git a/plugins/dockers/textproperties/qml/TextPropertyBase.qml b/plugins/dockers/textproperties/qml/TextPropertyBase.qml
index 1fea3b3591..e518e7c9bd 100644
--- a/plugins/dockers/textproperties/qml/TextPropertyBase.qml
+++ b/plugins/dockers/textproperties/qml/TextPropertyBase.qml
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick 2.15
+import QtQuick.Controls 2.15
import org.krita.flake.text 1.0
Column {
@@ -22,9 +23,7 @@ Column {
property string toolTip;
property var searchTerms: [];
- Rectangle {
- color: sysPalette.base;
- height: 1;
+ MenuSeparator {
width: parent.width;
}
}
diff --git a/plugins/dockers/textproperties/qml/TextTransform.qml b/plugins/dockers/textproperties/qml/TextTransform.qml
index f134757d54..e3a2b1afff 100644
--- a/plugins/dockers/textproperties/qml/TextTransform.qml
+++ b/plugins/dockers/textproperties/qml/TextTransform.qml
@@ -55,6 +55,8 @@ TextPropertyBase {
Label {
text: propertyName;
Layout.columnSpan: 2;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
diff --git a/plugins/dockers/textproperties/qml/WordBreak.qml b/plugins/dockers/textproperties/qml/WordBreak.qml
index e6d0eccc53..15f8a6a9d4 100644
--- a/plugins/dockers/textproperties/qml/WordBreak.qml
+++ b/plugins/dockers/textproperties/qml/WordBreak.qml
@@ -37,7 +37,9 @@ TextPropertyBase {
}
Label {
- text: propertyName
+ text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
diff --git a/plugins/dockers/textproperties/qml/WordSpacing.qml b/plugins/dockers/textproperties/qml/WordSpacing.qml
index e4116fb51e..9240f7d32a 100644
--- a/plugins/dockers/textproperties/qml/WordSpacing.qml
+++ b/plugins/dockers/textproperties/qml/WordSpacing.qml
@@ -35,7 +35,9 @@ TextPropertyBase {
}
Label {
- text: propertyName
+ text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}
SpinBox {
diff --git a/plugins/dockers/textproperties/qml/WritingMode.qml b/plugins/dockers/textproperties/qml/WritingMode.qml
index 1f13c570a9..8252c06590 100644
--- a/plugins/dockers/textproperties/qml/WritingMode.qml
+++ b/plugins/dockers/textproperties/qml/WritingMode.qml
@@ -37,6 +37,8 @@ TextPropertyBase {
Label {
text: propertyName;
+ elide: Text.ElideRight;
+ Layout.fillWidth: true;
}