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++
Create basic text properties docker UI.
Wolthera van Hövell tot Westerflier0d829c84e467
diff --git a/plugins/dockers/CMakeLists.txt b/plugins/dockers/CMakeLists.txtindex 7a586ce5e3..f71b5b1042 100644--- a/plugins/dockers/CMakeLists.txt+++ b/plugins/dockers/CMakeLists.txt@@ -30,4 +30,5 @@ add_subdirectory(logdocker)add_subdirectory(snapshotdocker)add_subdirectory(storyboarddocker)add_subdirectory(widegamutcolorselector)-add_subdirectory(brushhud)\ No newline at end of file+add_subdirectory(brushhud)+add_subdirectory(textproperties)diff --git a/plugins/dockers/textproperties/CMakeLists.txt b/plugins/dockers/textproperties/CMakeLists.txtnew file mode 100644index 0000000000..ef0cb18fc4--- /dev/null+++ b/plugins/dockers/textproperties/CMakeLists.txt@@ -0,0 +1,16 @@+set(KRITA_TEXTPROPERTIES_SOURCES+ TextPropertiesPlugin.cpp+ TextPropertiesDock.cpp+)++qt5_add_resources(KRITA_TEXTPROPERTIES_SOURCES textproperties.qrc)++kis_add_library(kritatextproperties MODULE ${KRITA_TEXTPROPERTIES_SOURCES})+target_link_libraries(kritatextproperties+ kritaui+ Qt5::Quick+ Qt5::QuickWidgets+ Qt5::Qml+)+install(TARGETS kritatextproperties DESTINATION ${KRITA_PLUGIN_INSTALL_DIR})+diff --git a/plugins/dockers/textproperties/TextPropertiesDock.cpp b/plugins/dockers/textproperties/TextPropertiesDock.cppnew file mode 100644index 0000000000..c1fba5164b--- /dev/null+++ b/plugins/dockers/textproperties/TextPropertiesDock.cpp@@ -0,0 +1,74 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */++#include "TextPropertiesDock.h"++#include <QQuickWidget>+#include <QQmlEngine>+#include <QQmlContext>++#include <KoResourcePaths.h>++class TextPropertiesDock::Private+{++};++TextPropertiesDock::TextPropertiesDock()+ : QDockWidget(i18n("Text Properties"))+ , d(new Private())+{+ m_quickWidget = new QQuickWidget(this);+ setWidget(m_quickWidget);+ setEnabled(true);++ m_quickWidget->engine()->rootContext()->setContextProperty("mainWindow", this);++ m_quickWidget->engine()->addImportPath(KoResourcePaths::getApplicationRoot() + "/lib/qml/");+ m_quickWidget->engine()->addImportPath(KoResourcePaths::getApplicationRoot() + "/lib64/qml/");++ m_quickWidget->engine()->addPluginPath(KoResourcePaths::getApplicationRoot() + "/lib/qml/");+ m_quickWidget->engine()->addPluginPath(KoResourcePaths::getApplicationRoot() + "/lib64/qml/");++ m_quickWidget->setPalette(this->palette());+ m_quickWidget->setMinimumHeight(100);++ m_quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);+ m_quickWidget->setSource(QUrl("qrc:/TextProperties.qml"));+}++TextPropertiesDock::~TextPropertiesDock()+{+ // Prevent double free+ m_quickWidget->setParent(nullptr);+ delete m_quickWidget;+}++void TextPropertiesDock::setCanvas(KoCanvasBase *canvas)+{+ setEnabled(true);++ if (m_canvas == canvas) {+ return;+ }++ if (m_canvas) {+ m_canvas->disconnectCanvasObserver(this);+ }++ if (!canvas) {+ m_canvas = 0;+ return;+ }++ m_canvas = dynamic_cast<KisCanvas2*>(canvas);+}++void TextPropertiesDock::unsetCanvas()+{+ setEnabled(false);+ m_canvas = 0;+}diff --git a/plugins/dockers/textproperties/TextPropertiesDock.h b/plugins/dockers/textproperties/TextPropertiesDock.hnew file mode 100644index 0000000000..d287c96832--- /dev/null+++ b/plugins/dockers/textproperties/TextPropertiesDock.h@@ -0,0 +1,37 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */++#ifndef TEXTPROPERTIESDOCK_H+#define TEXTPROPERTIESDOCK_H++#include <QDockWidget>+#include <QIcon>+#include <KoCanvasObserverBase.h>+#include <QPointer>++#include <kis_canvas2.h>++class KoDialog;+class QQuickWidget;++class TextPropertiesDock : public QDockWidget, public KoCanvasObserverBase {+ Q_OBJECT+public:+ TextPropertiesDock();+ ~TextPropertiesDock();+ QString observerName() override { return "TextPropertiesDock"; }+ void setCanvas(KoCanvasBase *canvas) override;+ void unsetCanvas() override;++private:+ QPointer<KisCanvas2> m_canvas;+ QQuickWidget *m_quickWidget {0};++ class Private;+ const QScopedPointer<Private> d;+};++#endif // TEXTPROPERTIESDOCK_Hdiff --git a/plugins/dockers/textproperties/TextPropertiesPlugin.cpp b/plugins/dockers/textproperties/TextPropertiesPlugin.cppnew file mode 100644index 0000000000..ce2427484e--- /dev/null+++ b/plugins/dockers/textproperties/TextPropertiesPlugin.cpp@@ -0,0 +1,64 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+#include "TextPropertiesPlugin.h"++#include <kis_debug.h>+#include <kpluginfactory.h>+#include <klocalizedstring.h>+#include <KoDockFactoryBase.h>++#include "kis_config.h"+#include "kis_types.h"+#include "KisViewManager.h"++#include "TextPropertiesDock.h"+#include <KoDockRegistry.h>++K_PLUGIN_FACTORY_WITH_JSON(TextPropertiesPluginFactory, "krita_textproperties.json", registerPlugin<TextPropertiesPlugin>();)++class TextPropertiesDockFactory : public KoDockFactoryBase {+public:+ TextPropertiesDockFactory()+ {+ }++ QString id() const override+ {+ return QString( "TextProperties" );+ }++ virtual Qt::DockWidgetArea defaultDockWidgetArea() const+ {+ return Qt::RightDockWidgetArea;+ }++ QDockWidget* createDockWidget() override+ {+ TextPropertiesDock * dockWidget = new TextPropertiesDock();++ dockWidget->setObjectName(id());++ return dockWidget;+ }++ DockPosition defaultDockPosition() const override+ {+ return DockMinimized;+ }++};++TextPropertiesPlugin::TextPropertiesPlugin(QObject *parent, const QVariantList &)+ : QObject(parent)+{+ KoDockRegistry::instance()->add(new TextPropertiesDockFactory());+}++TextPropertiesPlugin::~TextPropertiesPlugin()+{++}+#include "TextPropertiesPlugin.moc"diff --git a/plugins/dockers/textproperties/TextPropertiesPlugin.h b/plugins/dockers/textproperties/TextPropertiesPlugin.hnew file mode 100644index 0000000000..28b079ca28--- /dev/null+++ b/plugins/dockers/textproperties/TextPropertiesPlugin.h@@ -0,0 +1,20 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+#ifndef TEXTPROPERTIESPLUGIN_H+#define TEXTPROPERTIESPLUGIN_H++#include <QObject>+#include <QVariant>++class TextPropertiesPlugin : public QObject+{+ Q_OBJECT+public:+ TextPropertiesPlugin(QObject *parent, const QVariantList &);+ ~TextPropertiesPlugin();+};++#endif // TEXTPROPERTIESPLUGIN_Hdiff --git a/plugins/dockers/textproperties/krita_textproperties.json b/plugins/dockers/textproperties/krita_textproperties.jsonnew file mode 100644index 0000000000..dc841bda25--- /dev/null+++ b/plugins/dockers/textproperties/krita_textproperties.json@@ -0,0 +1,10 @@+{+ "Id": "Text Properties Docker",+ "Type": "Service",+ "X-KDE-Library": "kritatextproperties",+ "X-KDE-ServiceTypes": [+ "Krita/Dock"+ ],+ "X-Krita-Version": "28"+}+diff --git a/plugins/dockers/textproperties/qml/AlignmentBaseline.qml b/plugins/dockers/textproperties/qml/AlignmentBaseline.qmlnew file mode 100644index 0000000000..f8ba0749e4--- /dev/null+++ b/plugins/dockers/textproperties/qml/AlignmentBaseline.qml@@ -0,0 +1,43 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Alignment Baseline:"+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ ComboBox {+ model: ["Baseline", "Alphabetic", "Ideographic", "Central", "Hanging", "Middle", "Mathematical", "Text-Top", "Text-Bottom"]+ Layout.fillWidth: true;+ id: baselineCmb;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/BaselineShift.qml b/plugins/dockers/textproperties/qml/BaselineShift.qmlnew file mode 100644index 0000000000..76839d2313--- /dev/null+++ b/plugins/dockers/textproperties/qml/BaselineShift.qml@@ -0,0 +1,58 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Baseline-Shift:"+ Layout.columnSpan: 2;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }++ ComboBox {+ Layout.columnSpan: 2;+ model: ["Number", "Super", "Sub"]+ id: baselineShiftCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ SpinBox {+ id: baselineShiftSpn+ Layout.fillWidth: true;+ }++ ComboBox {+ model: ["Pt", "Em", "Ex"]+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml b/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qmlnew file mode 100644index 0000000000..9904cfb588--- /dev/null+++ b/plugins/dockers/textproperties/qml/CollapsibleGroupProperty.qml@@ -0,0 +1,66 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Layouts 1.3+import QtQuick.Controls 2.15++TextPropertyBase {+ id: root;+ property alias propertyName: propertyTitle.text;+ property alias contentItem: contentItemContainer.data;+ property alias titleItem: titleItemContainer.data;+ spacing: columnSpacing;++ SystemPalette {+ id: sysPalette;+ }++ GridLayout {+ id: grid;+ flow: GridLayout.LeftToRight+ columns: 2;+ columnSpacing: root.columnSpacing;++ Item {+ Layout.preferredHeight: firstColumnWidth;+ Layout.preferredWidth: firstColumnWidth;+ Layout.minimumHeight: firstColumnWidth;+ Layout.minimumWidth: firstColumnWidth;+ ToolButton {+ id: collapse;+ display: AbstractButton.IconOnly+ icon.source: contentItemContainer.visible? "qrc:///light_groupOpened.svg" : "qrc:///light_groupClosed.svg";+ icon.width: 12;+ icon.height: 12;+ onClicked: contentItemContainer.visible = !contentItemContainer.visible;++ anchors.horizontalCenter: parent.horizontalCenter;+ anchors.verticalCenter: parent.verticalCenter;+ }+ }+++ RowLayout {+ id: titleItemContainer;+ Layout.fillWidth: true;+ spacing: columnSpacing;+ Label {+ id: propertyTitle;+ text: "property name";+ height: parent.height;+ verticalAlignment: Text.AlignVCenter+ color: sysPalette.text;++ }+ }+ }++ Item {+ id: contentItemContainer;+ width: parent.width;+ height: childrenRect.height;+ }+}diff --git a/plugins/dockers/textproperties/qml/Direction.qml b/plugins/dockers/textproperties/qml/Direction.qmlnew file mode 100644index 0000000000..2151e6d549--- /dev/null+++ b/plugins/dockers/textproperties/qml/Direction.qml@@ -0,0 +1,38 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ id: row+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Direction:";+ }++ ComboBox {+ id: directionCmb+ Layout.fillWidth: true;+ model: ["Left to Right", "Right to Left"]+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/DominantBaseline.qml b/plugins/dockers/textproperties/qml/DominantBaseline.qmlnew file mode 100644index 0000000000..7a372f2a65--- /dev/null+++ b/plugins/dockers/textproperties/qml/DominantBaseline.qml@@ -0,0 +1,43 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Dominant Baseline:"+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ ComboBox {+ model: ["Alphabetic", "Ideographic", "Central", "Hanging", "Middle", "Mathematical", "Text-Top", "Text-Bottom"]+ Layout.fillWidth: true;+ id: baselineCmb;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/FontFamily.qml b/plugins/dockers/textproperties/qml/FontFamily.qmlnew file mode 100644index 0000000000..f0a84c7eef--- /dev/null+++ b/plugins/dockers/textproperties/qml/FontFamily.qml@@ -0,0 +1,64 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.15+import QtQuick.Layouts 1.12++CollapsibleGroupProperty {+ propertyName: "Font Family:";++ titleItem: ComboBox {+ id: mainFamilyCmb;+ Layout.fillWidth: true;+ }++ contentItem: GridLayout {+ columns: 2+ anchors.left: parent.left+ anchors.right: parent.right+ columnSpacing: columnSpacing;++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }++ ScrollView {+ id: fullFamilyList;+ Layout.fillWidth: true;+ background: Rectangle {+ color: sysPalette.alternateBase;+ border.color: sysPalette.text;+ border.width: 1;+ }++ Layout.preferredHeight: childrenRect.height;+ ListView {+ anchors.fill: parent;+ model: ListModel {+ ListElement {+ text: "Font A";+ }+ ListElement {+ text: "Font B";+ }+ ListElement {+ text: "Font C";+ }+ }+ delegate: ItemDelegate {+ text: model.text;+ width: parent.width;+ }+ }+ }+++ }+}+diff --git a/plugins/dockers/textproperties/qml/FontSize.qml b/plugins/dockers/textproperties/qml/FontSize.qmlnew file mode 100644index 0000000000..bece4d267d--- /dev/null+++ b/plugins/dockers/textproperties/qml/FontSize.qml@@ -0,0 +1,40 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Font Size:"+ }++ SpinBox {+ id: fontSizeSpn+ Layout.fillWidth: true;+ }++ ComboBox {+ model: ["Pt", "Em", "Ex"]+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/FontStyle.qml b/plugins/dockers/textproperties/qml/FontStyle.qmlnew file mode 100644index 0000000000..fef1c4a20c--- /dev/null+++ b/plugins/dockers/textproperties/qml/FontStyle.qml@@ -0,0 +1,90 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++CollapsibleGroupProperty {+ propertyName: "Font Style";++ titleItem: ComboBox {+ id: styleCmb;+ Layout.fillWidth: true;+ }++ contentItem: GridLayout {+ columns: 3+ anchors.left: parent.left+ anchors.right: parent.right+ columnSpacing: 5;++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Label {+ text: "Weight:"+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter+ horizontalAlignment: Text.AlignRight;+ }++ SpinBox {+ id: fontWeightSpn+ Layout.fillWidth: true+ }+++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Label {+ text: "Width:"+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter+ horizontalAlignment: Text.AlignRight;+ }++ SpinBox {+ id: fontStretchSpn+ Layout.fillWidth: true+ }++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Item {+ width: 1;+ height: 1;}+ CheckBox {+ id: italicsCbx+ text: "Italics"+ Layout.fillWidth: true+ }++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Item {+ width: 1;+ height: 1;}+ CheckBox {+ id: opticalSizeCbx+ text: "Optical Size"+ Layout.fillWidth: true+ }++ }+}diff --git a/plugins/dockers/textproperties/qml/HangingPunctuation.qml b/plugins/dockers/textproperties/qml/HangingPunctuation.qmlnew file mode 100644index 0000000000..a850896ace--- /dev/null+++ b/plugins/dockers/textproperties/qml/HangingPunctuation.qml@@ -0,0 +1,69 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Hanging-punctuation:"+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ text: "Hang First"+ id: paragraphStartCbx;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Line End:"+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ ComboBox {+ model: ["No Hanging", "Allow hanging commas", "Force hanging commas"]+ Layout.fillWidth: true;+ id: lineEndCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }++ CheckBox {+ text: "Hang Last"+ id: paragraphEndCbx;+ }++ }+}diff --git a/plugins/dockers/textproperties/qml/LetterSpacing.qml b/plugins/dockers/textproperties/qml/LetterSpacing.qmlnew file mode 100644index 0000000000..a53c7a3a31--- /dev/null+++ b/plugins/dockers/textproperties/qml/LetterSpacing.qml@@ -0,0 +1,40 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Letter Spacing:"+ }++ SpinBox {+ id: fontSizeSpn+ Layout.fillWidth: true;+ }++ ComboBox {+ model: ["Pt", "Em", "Ex"]+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/LineBreak.qml b/plugins/dockers/textproperties/qml/LineBreak.qmlnew file mode 100644index 0000000000..950255953c--- /dev/null+++ b/plugins/dockers/textproperties/qml/LineBreak.qml@@ -0,0 +1,37 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Line Break:"+ }++ ComboBox {+ id: lineBreakCmb+ model: ["Auto", "Loose", "Normal", "Strict", "Anywhere"]+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/LineHeight.qml b/plugins/dockers/textproperties/qml/LineHeight.qmlnew file mode 100644index 0000000000..0e13092285--- /dev/null+++ b/plugins/dockers/textproperties/qml/LineHeight.qml@@ -0,0 +1,57 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Line Height:"+ Layout.columnSpan: 2;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }++ CheckBox {+ Layout.columnSpan: 2;+ text: "Normal"+ id: lineHeightNormalCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ SpinBox {+ id: lineHeightSpn+ Layout.fillWidth: true;+ }++ ComboBox {+ model: ["Pt", "Em", "Ex"]+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/OTCaps.qml b/plugins/dockers/textproperties/qml/OTCaps.qmlnew file mode 100644index 0000000000..23c0256da5--- /dev/null+++ b/plugins/dockers/textproperties/qml/OTCaps.qml@@ -0,0 +1,42 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Glyphs: Capitals:"+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ ComboBox {+ model: ["Normal", "Small Caps", "All Small Caps", "Petite Caps", "All Petite Caps", "Unicase", "Titling Caps"]+ Layout.fillWidth: true;+ id: positionCmb;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/OTEastAsian.qml b/plugins/dockers/textproperties/qml/OTEastAsian.qmlnew file mode 100644index 0000000000..2358e15fa2--- /dev/null+++ b/plugins/dockers/textproperties/qml/OTEastAsian.qml@@ -0,0 +1,71 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Glyphs: East-Asian:"+ Layout.columnSpan: 2;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Variant:"+ }+ ComboBox {+ model: ["Normal", "JIS78", "JIS83", "JIS90", "JIS04", "Simplified", "Traditional"]+ Layout.fillWidth: true;+ id: variantCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Width:"+ }+ ComboBox {+ model: ["Normal", "Full width", "Proportional"]+ Layout.fillWidth: true;+ id: widthCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ Layout.columnSpan: 2;+ }+ CheckBox {+ text: "Ruby"+ id: rubyCbx;+ }++ }+}diff --git a/plugins/dockers/textproperties/qml/OTLigatures.qml b/plugins/dockers/textproperties/qml/OTLigatures.qmlnew file mode 100644index 0000000000..49f5e33e89--- /dev/null+++ b/plugins/dockers/textproperties/qml/OTLigatures.qml@@ -0,0 +1,68 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Glyphs: Ligatures:"+ Layout.fillWidth: true;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ text: "Common"+ id: commonLigaCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ text: "Discretionary"+ id: discretionaryLigaCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ text: "Historical"+ id: historicalLigaCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ text: "Contextual"+ id: contextualLigaCbx;+ }++ }+}diff --git a/plugins/dockers/textproperties/qml/OTNumeric.qml b/plugins/dockers/textproperties/qml/OTNumeric.qmlnew file mode 100644index 0000000000..7f9702fa44--- /dev/null+++ b/plugins/dockers/textproperties/qml/OTNumeric.qml@@ -0,0 +1,95 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Glyphs: Numeric:"+ Layout.columnSpan: 2;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Style:"+ }+ ComboBox {+ model: ["Normal", "Lining", "Oldstyle"]+ Layout.fillWidth: true;+ id: styleCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Spacing:"+ }+ ComboBox {+ model: ["Normal", "Proportional", "Tabular"]+ Layout.fillWidth: true;+ id: spacingCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Fractions:"+ }+ ComboBox {+ model: ["Normal", "Diagonal", "Stacked"]+ Layout.fillWidth: true;+ id: fractionCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ Layout.columnSpan: 2;+ }+ CheckBox {++ text: "Ordinals"+ id: ordinalsCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ Layout.columnSpan: 2;+ }+ CheckBox {++ text: "Slashed Zero"+ id: slashZeroCbx;+ }++ }+}diff --git a/plugins/dockers/textproperties/qml/OTPosition.qml b/plugins/dockers/textproperties/qml/OTPosition.qmlnew file mode 100644index 0000000000..440705e485--- /dev/null+++ b/plugins/dockers/textproperties/qml/OTPosition.qml@@ -0,0 +1,43 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Glyphs: Position:"+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ ComboBox {+ model: ["Normal", "Super", "Sub"]+ Layout.fillWidth: true;+ id: positionCmb;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/OverflowWrap.qml b/plugins/dockers/textproperties/qml/OverflowWrap.qmlnew file mode 100644index 0000000000..32f4069d0d--- /dev/null+++ b/plugins/dockers/textproperties/qml/OverflowWrap.qml@@ -0,0 +1,38 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Writing Mode:"+ }+++ ComboBox {+ id: writingModeCmb+ model: ["Horizontal", "Vertical, Right to Left", "Vertical, Left To Right"]+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/TabSize.qml b/plugins/dockers/textproperties/qml/TabSize.qmlnew file mode 100644index 0000000000..3c09e6754e--- /dev/null+++ b/plugins/dockers/textproperties/qml/TabSize.qml@@ -0,0 +1,43 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3+ anchors.left: parent.left+ anchors.right: parent.right+ columnSpacing: columnSpacing;++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Label {+ text: "Tab Size:"+ Layout.columnSpan: 2;+ Layout.fillWidth: true;+ }++ Item {+ width: 1;+ height: 1;+ }++ SpinBox {+ id: tabSizeSpn;+ Layout.fillWidth: true;+ }+ ComboBox {+ model: ["Spaces", "Pt", "Em", "Ex"]+ }++ }+}diff --git a/plugins/dockers/textproperties/qml/TextAlign.qml b/plugins/dockers/textproperties/qml/TextAlign.qmlnew file mode 100644index 0000000000..285f3337e1--- /dev/null+++ b/plugins/dockers/textproperties/qml/TextAlign.qml@@ -0,0 +1,56 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++CollapsibleGroupProperty {+ propertyName: "Text Align";++ contentItem: GridLayout {+ columns: 3+ anchors.left: parent.left+ anchors.right: parent.right+ columnSpacing: columnSpacing;++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Label {+ text: "Text Align:"+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter+ }++ ComboBox {+ id: textAlignAllCmb;+ model: ["Left", "Start", "Center", "End", "Right", "Justified"]+ Layout.fillWidth: true+ }+++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ Label {+ text: "Text Anchor:"+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter+ }++ ComboBox {+ id: textAnchorCmb;+ model: ["Start", "Middle", "End"]+ Layout.fillWidth: true+ }++ }+}+diff --git a/plugins/dockers/textproperties/qml/TextDecoration.qml b/plugins/dockers/textproperties/qml/TextDecoration.qmlnew file mode 100644index 0000000000..ae26bae057--- /dev/null+++ b/plugins/dockers/textproperties/qml/TextDecoration.qml@@ -0,0 +1,100 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Text Decoration:"+ Layout.columnSpan: 2;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Line:"+ Layout.columnSpan: 2;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ Layout.columnSpan: 2;+ text: "Underline"+ id: underlineCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ Layout.columnSpan: 2;+ text: "Overline"+ id: overlineCbx;+ }+ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ Layout.columnSpan: 2;+ text: "Line-through"+ id: linethoughCbx;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }++ CheckBox {+ text: "Color"+ id: colorCbx;+ }+ Rectangle {+ // replace with color picker?+ Layout.fillWidth: true;+ Layout.fillHeight: true;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ Label {+ text: "Style:"+ }++ ComboBox {+ model: ["Solid", "Dotted", "Dashed", "Double", "Wavy"]+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/TextIndent.qml b/plugins/dockers/textproperties/qml/TextIndent.qmlnew file mode 100644index 0000000000..9c1cc8abb9--- /dev/null+++ b/plugins/dockers/textproperties/qml/TextIndent.qml@@ -0,0 +1,60 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++CollapsibleGroupProperty {+ propertyName: "Text Indent:";++ titleItem: RowLayout {+ spacing: columnSpacing;+ Layout.fillWidth: true;+ SpinBox {+ id: textIndentSpn;+ Layout.fillWidth: true;+ }+ ComboBox {+ model: ["Pt", "Em", "Ex"]+ }+ }++ contentItem: GridLayout {+ columns: 2+ anchors.left: parent.left+ anchors.right: parent.right+ columnSpacing: columnSpacing;++ ToolButton {+ width: firstColumnWidth;+ height: firstColumnWidth;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+++ CheckBox {+ id: indentHangingCkb;+ text: "Hanging indentation"+ Layout.fillWidth: true+ }++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ Layout.columnSpan: 1;+ }++ CheckBox {+ id: eachLineCkb;+ text: "Indent after hardbreaks"+ Layout.fillWidth: true+ }++ }+}++diff --git a/plugins/dockers/textproperties/qml/TextProperties.qml b/plugins/dockers/textproperties/qml/TextProperties.qmlnew file mode 100644index 0000000000..70c432cda6--- /dev/null+++ b/plugins/dockers/textproperties/qml/TextProperties.qml@@ -0,0 +1,147 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQml.Models 2.1+import QtQuick.Controls 2.5+import QtQuick.Layouts 1.12+++Rectangle {+ id: root;+ color: sysPalette.window;+ anchors.fill: parent;++ SystemPalette {+ id: sysPalette;+ colorGroup: SystemPalette.Active+ }++ TabBar {+ id: tabs+ anchors.right: parent.right;+ anchors.left: parent.left;+ anchors.top: parent.top;+ TabButton {+ text: "Character"+ }+ TabButton {+ text: "Paragraph"+ }+ }++ StackLayout {+ currentIndex: tabs.currentIndex;+ anchors.bottom: parent.bottom;+ anchors.right: parent.right;+ anchors.left: parent.left;+ anchors.top: tabs.bottom;++ ScrollView {+ background: Rectangle {+ color: sysPalette.alternateBase;+ border.color: sysPalette.base;+ border.width: 1;+ }++ ListView {+ id: characterProperties+ model: ObjectModel {+ FontSize {+ width: characterProperties.width;+ }+ FontFamily {+ width: characterProperties.width;+ }+ FontStyle {+ width: characterProperties.width;+ }+ LetterSpacing {+ width: characterProperties.width;+ }+ WordSpacing {+ width: characterProperties.width;+ }+ LineHeight {+ width: characterProperties.width;+ }+ LineBreak {+ width: characterProperties.width;+ }+ WordBreak {+ width: characterProperties.width;+ }+ TextTransform {+ width: characterProperties.width;+ }+ TextDecoration {+ width: characterProperties.width;+ }+ OTLigatures {+ width: characterProperties.width;+ }+ OTPosition {+ width: characterProperties.width;+ }+ OTNumeric {+ width: characterProperties.width;+ }+ OTCaps {+ width: characterProperties.width;+ }+ OTEastAsian {+ width: characterProperties.width;+ }+ BaselineShift {+ width: characterProperties.width;+ }+ AlignmentBaseline {+ width: characterProperties.width;+ }+ }+ }+ }++ ScrollView {+ background: Rectangle {+ color: sysPalette.alternateBase;+ border.color: sysPalette.base;+ border.width: 1;+ }+ ListView {+ id: paragraphProperties+ model: ObjectModel {+ WritingMode {+ width: parent.width;+ }+ Direction{+ width: parent.width;+ }+ TextIndent{+ width: parent.width;+ }+ TextAlign{+ width: parent.width;+ }+ DominantBaseline {+ width: parent.width;+ }+ WhiteSpace {+ width: parent.width;+ }+ UnderlinePosition {+ width: parent.width;+ }+ HangingPunctuation {+ width: parent.width;+ }+ TabSize {+ width: parent.width;+ }+ }+ }+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/TextPropertyBase.qml b/plugins/dockers/textproperties/qml/TextPropertyBase.qmlnew file mode 100644index 0000000000..3d77411bb3--- /dev/null+++ b/plugins/dockers/textproperties/qml/TextPropertyBase.qml@@ -0,0 +1,17 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.15++Column {+ property int firstColumnWidth: 32;+ property int columnSpacing: 5;++ Rectangle {+ color: sysPalette.base;+ height: 1;+ width: parent.width;+ }+}diff --git a/plugins/dockers/textproperties/qml/TextTransform.qml b/plugins/dockers/textproperties/qml/TextTransform.qmlnew file mode 100644index 0000000000..467cb547a1--- /dev/null+++ b/plugins/dockers/textproperties/qml/TextTransform.qml@@ -0,0 +1,71 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 3;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Text Transform:"+ Layout.columnSpan: 2;+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }++ Label {+ text: "Case:"+ }++ ComboBox {+ id: textTransformCaseCmb;+ model: ["None", "Capitalize", "UpperCase", "Lowercase"]+ Layout.fillWidth: true+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ Layout.columnSpan: 2;+ }+ CheckBox {+ id: fullWidthChk;+ text: "Full-width"+ Layout.fillWidth: true;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ Layout.columnSpan: 2;+ }+ CheckBox {+ id: fullSizeKanaChk;+ text: "Full-size Kana"+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/UnderlinePosition.qml b/plugins/dockers/textproperties/qml/UnderlinePosition.qmlnew file mode 100644index 0000000000..0e0327497c--- /dev/null+++ b/plugins/dockers/textproperties/qml/UnderlinePosition.qml@@ -0,0 +1,51 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ GridLayout {+ columns: 2;+ columnSpacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Underline Position:"+ }+++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ ComboBox {+ model: ["Vertical Left", "Vertical Right"]+ Layout.fillWidth: true;+ id: verticalPositionCmb;+ }++ Item {+ width: firstColumnWidth;+ height: 1;+ }+ CheckBox {+ text: "Horizontal Auto";+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/WhiteSpace.qml b/plugins/dockers/textproperties/qml/WhiteSpace.qmlnew file mode 100644index 0000000000..6b8e69e953--- /dev/null+++ b/plugins/dockers/textproperties/qml/WhiteSpace.qml@@ -0,0 +1,38 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "White Space:"+ }+++ ComboBox {+ id: wordBreakCmb+ model: ["Normal", "Pre", "No Wrap", "Pre Wrap", "Break Spaces", "Pre Line"]+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/WordBreak.qml b/plugins/dockers/textproperties/qml/WordBreak.qmlnew file mode 100644index 0000000000..3cebb8935a--- /dev/null+++ b/plugins/dockers/textproperties/qml/WordBreak.qml@@ -0,0 +1,38 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Word Break:"+ }+++ ComboBox {+ id: wordBreakCmb+ model: ["Normal", "Keep-all", "Break-all"]+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/WordSpacing.qml b/plugins/dockers/textproperties/qml/WordSpacing.qmlnew file mode 100644index 0000000000..01b59f59c6--- /dev/null+++ b/plugins/dockers/textproperties/qml/WordSpacing.qml@@ -0,0 +1,40 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Word Spacing:"+ }++ SpinBox {+ id: fontSizeSpn+ Layout.fillWidth: true;+ }++ ComboBox {+ model: ["Pt", "Em", "Ex"]+ }+ }+}diff --git a/plugins/dockers/textproperties/qml/WritingMode.qml b/plugins/dockers/textproperties/qml/WritingMode.qmlnew file mode 100644index 0000000000..32f4069d0d--- /dev/null+++ b/plugins/dockers/textproperties/qml/WritingMode.qml@@ -0,0 +1,38 @@+/*+ * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <[email protected]>+ *+ * SPDX-License-Identifier: GPL-2.0-or-later+ */+import QtQuick 2.0+import QtQuick.Controls 2.0+import QtQuick.Layouts 1.12++TextPropertyBase {+ RowLayout {+ spacing: columnSpacing;+ width: parent.width;++ Item {+ width: firstColumnWidth;+ height: firstColumnWidth;+ ToolButton {+ id: revert;+ icon.width: 22;+ icon.height: 22;+ display: AbstractButton.IconOnly+ icon.source: "qrc:///light_view-refresh.svg"+ }+ }++ Label {+ text: "Writing Mode:"+ }+++ ComboBox {+ id: writingModeCmb+ model: ["Horizontal", "Vertical, Right to Left", "Vertical, Left To Right"]+ Layout.fillWidth: true;+ }+ }+}diff --git a/plugins/dockers/textproperties/textproperties.qrc b/plugins/dockers/textproperties/textproperties.qrcnew file mode 100644index 0000000000..26835ff8e3--- /dev/null+++ b/plugins/dockers/textproperties/textproperties.qrc@@ -0,0 +1,33 @@+<RCC>+ <qresource prefix="/">+ <file alias="TextProperties.qml">qml/TextProperties.qml</file>+ <file alias="TextPropertyBase.qml">qml/TextPropertyBase.qml</file>+ <file alias="CollapsibleGroupProperty.qml">qml/CollapsibleGroupProperty.qml</file>+ <file alias="FontSize.qml">qml/FontSize.qml</file>+ <file alias="FontStyle.qml">qml/FontStyle.qml</file>+ <file alias="FontFamily.qml">qml/FontFamily.qml</file>+ <file alias="WritingMode.qml">qml/WritingMode.qml</file>+ <file alias="TextAlign.qml">qml/TextAlign.qml</file>+ <file alias="Direction.qml">qml/Direction.qml</file>+ <file alias="TextIndent.qml">qml/TextIndent.qml</file>+ <file alias="LetterSpacing.qml">qml/LetterSpacing.qml</file>+ <file alias="WordSpacing.qml">qml/WordSpacing.qml</file>+ <file alias="LineBreak.qml">qml/LineBreak.qml</file>+ <file alias="WordBreak.qml">qml/WordBreak.qml</file>+ <file alias="LineHeight.qml">qml/LineHeight.qml</file>+ <file alias="TextTransform.qml">qml/TextTransform.qml</file>+ <file alias="TextDecoration.qml">qml/TextDecoration.qml</file>+ <file alias="OTLigatures.qml">qml/OTLigatures.qml</file>+ <file alias="OTCaps.qml">qml/OTCaps.qml</file>+ <file alias="OTPosition.qml">qml/OTPosition.qml</file>+ <file alias="OTNumeric.qml">qml/OTNumeric.qml</file>+ <file alias="OTEastAsian.qml">qml/OTEastAsian.qml</file>+ <file alias="BaselineShift.qml">qml/BaselineShift.qml</file>+ <file alias="DominantBaseline.qml">qml/DominantBaseline.qml</file>+ <file alias="AlignmentBaseline.qml">qml/AlignmentBaseline.qml</file>+ <file alias="HangingPunctuation.qml">qml/HangingPunctuation.qml</file>+ <file alias="TabSize.qml">qml/TabSize.qml</file>+ <file alias="WhiteSpace.qml">qml/WhiteSpace.qml</file>+ <file alias="UnderlinePosition.qml">qml/UnderlinePosition.qml</file>+ </qresource>+</RCC>