mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05: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
|
@ -363,10 +363,11 @@ Item
|
|||
ReadOnlyTextArea
|
||||
{
|
||||
text: properties.description;
|
||||
width: 2 * informationPage.columnWidth
|
||||
width: informationPage.columnWidth * 2
|
||||
height: 0.75 * informationPage.columnWidth
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readOnly: !base.editingEnabled;
|
||||
readOnly: !base.editingEnabled
|
||||
|
||||
onEditingFinished: base.setMetaDataEntry("description", properties.description, text)
|
||||
}
|
||||
|
@ -375,11 +376,11 @@ Item
|
|||
|
||||
ReadOnlyTextArea
|
||||
{
|
||||
text: properties.adhesion_info;
|
||||
text: properties.adhesion_info
|
||||
width: 2 * informationPage.columnWidth
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readOnly: !base.editingEnabled;
|
||||
height: 0.75 * informationPage.columnWidth
|
||||
readOnly: !base.editingEnabled
|
||||
|
||||
onEditingFinished: base.setMetaDataEntry("adhesion_info", properties.adhesion_info, text)
|
||||
}
|
||||
|
|
|
@ -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