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++
Make the text property config dialog a little prettier.
Wolthera van Hövell tot Westerfliere12b2f468f26
diff --git a/plugins/dockers/textproperties/qml/TextPropertyConfigDialog.qml b/plugins/dockers/textproperties/qml/TextPropertyConfigDialog.qmlindex 3d474d815d..b617c48f85 100644--- a/plugins/dockers/textproperties/qml/TextPropertyConfigDialog.qml+++ b/plugins/dockers/textproperties/qml/TextPropertyConfigDialog.qml@@ -63,49 +63,64 @@ Control {}- ListView {- id: configListView;- model: configModel;+ Frame {Layout.fillWidth: true;Layout.fillHeight: true;- clip: true;-- ScrollBar.vertical: ScrollBar {+ padding: 0;+ background: Rectangle {+ color: palette.base;}- delegate: ItemDelegate {- id: configDelegate;- width: configListView.width;- height: implicitHeight;- required property var model;- required property int index;-- palette: control.palette;- contentItem: RowLayout {- Label {- text: configDelegate.model.title;- Layout.fillWidth: true;- palette: control.palette;+ ListView {+ id: configListView;+ model: configModel;+ anchors.fill: parent;+ clip: true;++ ScrollBar.vertical: ScrollBar {+ }++ delegate: ItemDelegate {+ id: configDelegate;+ width: configListView.width;+ height: implicitHeight;+ required property var model;+ required property int index;++ palette: control.palette;++ background: Rectangle {+ color: "transparent";}- ComboBox {- id: visibilityCmb;- Layout.preferredWidth: implicitWidth;- model: [- {text: i18nc("@label:inlistbox", "Follow Default"), value: TextPropertyConfigModel.FollowDefault},- {text: i18nc("@label:inlistbox", "When Relevant"), value: TextPropertyConfigModel.WhenRelevant},- {text: i18nc("@label:inlistbox", "When Set"), value: TextPropertyConfigModel.WhenSet},- {text: i18nc("@label:inlistbox", "Always Show"), value: TextPropertyConfigModel.AlwaysVisible},- {text: i18nc("@label:inlistbox", "Never Show"), value: TextPropertyConfigModel.NeverVisible}- ]-- palette: control.palette;- textRole: "text";- valueRole: "value";- Component.onCompleted: {- currentIndex = indexOfValue(configDelegate.model.visibility);- }- onActivated: configDelegate.model.visibility = currentValue;+ contentItem: RowLayout {+ Label {+ text: configDelegate.model.title;+ Layout.fillWidth: true;+ palette: control.palette;+ }+ ComboBox {+ id: visibilityCmb;+ Layout.minimumWidth: implicitWidth;+ Layout.preferredWidth: implicitWidth * 1.1;+ Layout.maximumWidth: configDelegate.width * 0.5;+ model: [+ {text: i18nc("@label:inlistbox", "Follow Default"), value: TextPropertyConfigModel.FollowDefault},+ {text: i18nc("@label:inlistbox", "When Relevant"), value: TextPropertyConfigModel.WhenRelevant},+ {text: i18nc("@label:inlistbox", "When Set"), value: TextPropertyConfigModel.WhenSet},+ {text: i18nc("@label:inlistbox", "Always Show"), value: TextPropertyConfigModel.AlwaysVisible},+ {text: i18nc("@label:inlistbox", "Never Show"), value: TextPropertyConfigModel.NeverVisible}+ ]++ palette: control.palette;+ textRole: "text";+ valueRole: "value";+ Component.onCompleted: {+ currentIndex = indexOfValue(configDelegate.model.visibility);+ }++ onActivated: configDelegate.model.visibility = currentValue;+ }}}}