mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Update ReadOnlyTextArea to controls 2
CURA-8685
This commit is contained in:
parent
b9feac9816
commit
a20dac4c9b
2 changed files with 17 additions and 11 deletions
|
@ -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:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue