Browse Source

Update ReadOnlyTextArea import

Update ReadOnlyTextArea style (It's not really read only 🤔)

CURA-8979
j.delarago 3 years ago
parent
commit
59b7d20f75

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

+ 2 - 5
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()