Update ReadOnlyTextArea to controls 2

CURA-8685
This commit is contained in:
Jaime van Kessel 2022-02-15 15:08:06 +01:00
parent b9feac9816
commit a20dac4c9b
2 changed files with 17 additions and 11 deletions

View file

@ -2,9 +2,9 @@
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.15
Item
ScrollView
{
id: base
@ -15,17 +15,22 @@ Item
property bool readOnly: false
width: textArea.width
height: textArea.height
TextArea
{
id: textArea
enabled: !base.readOnly
opacity: base.readOnly ? 0.5 : 1.0
selectByMouse: true
anchors.fill: parent
background: Rectangle
{
radius: UM.Theme.getSize("setting_control_radius").width
color: enabled ? UM.Theme.getColor("setting_control_disabled") : UM.Theme.getColor("setting_control")
}
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
Keys.onReturnPressed:
{