From 59b7d20f75ad76daa1113b3807c0cecbcb03f903 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 15 Mar 2022 14:50:02 +0100 Subject: [PATCH] Update ReadOnlyTextArea import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update ReadOnlyTextArea style (It's not really read only 🤔) CURA-8979 --- resources/qml/Preferences/Materials/MaterialsView.qml | 6 ++---- resources/qml/Preferences/ReadOnlyTextArea.qml | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml index a860472f39..4c15e04972 100644 --- a/resources/qml/Preferences/Materials/MaterialsView.qml +++ b/resources/qml/Preferences/Materials/MaterialsView.qml @@ -9,8 +9,6 @@ import QtQuick.Layouts 1.3 import UM 1.5 as UM import Cura 1.0 as Cura -import ".." // Access to ReadOnlyTextArea.qml - Item { id: base @@ -479,7 +477,7 @@ Item height: parent.rowHeight text: catalog.i18nc("@label", "Description") } - ReadOnlyTextArea + Cura.ReadOnlyTextArea { text: properties.description width: informationPage.width @@ -498,7 +496,7 @@ Item text: catalog.i18nc("@label", "Adhesion Information") } - ReadOnlyTextArea + Cura.ReadOnlyTextArea { text: properties.adhesion_info width: informationPage.width diff --git a/resources/qml/Preferences/ReadOnlyTextArea.qml b/resources/qml/Preferences/ReadOnlyTextArea.qml index c6f253f0ca..291e241718 100644 --- a/resources/qml/Preferences/ReadOnlyTextArea.qml +++ b/resources/qml/Preferences/ReadOnlyTextArea.qml @@ -23,13 +23,10 @@ ScrollView enabled: !base.readOnly selectByMouse: true - background: Rectangle - { - radius: UM.Theme.getSize("setting_control_radius").width - color: textArea.enabled ? UM.Theme.getColor("setting_control") : UM.Theme.getColor("setting_control_disabled") - } + background: UM.UnderlineBackground { id: backgroundRectangle } color: UM.Theme.getColor("text") + selectionColor: UM.Theme.getColor("text_selection") font: UM.Theme.getFont("default") Keys.onReturnPressed: base.editingFinished()