mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 19:35:56 +08:00
Update ReadOnlyTextArea to controls 2
CURA-8685
This commit is contained in:
parent
b9feac9816
commit
a20dac4c9b
@ -363,10 +363,11 @@ Item
|
|||||||
ReadOnlyTextArea
|
ReadOnlyTextArea
|
||||||
{
|
{
|
||||||
text: properties.description;
|
text: properties.description;
|
||||||
width: 2 * informationPage.columnWidth
|
width: informationPage.columnWidth * 2
|
||||||
|
height: 0.75 * informationPage.columnWidth
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
|
||||||
readOnly: !base.editingEnabled;
|
readOnly: !base.editingEnabled
|
||||||
|
|
||||||
onEditingFinished: base.setMetaDataEntry("description", properties.description, text)
|
onEditingFinished: base.setMetaDataEntry("description", properties.description, text)
|
||||||
}
|
}
|
||||||
@ -375,11 +376,11 @@ Item
|
|||||||
|
|
||||||
ReadOnlyTextArea
|
ReadOnlyTextArea
|
||||||
{
|
{
|
||||||
text: properties.adhesion_info;
|
text: properties.adhesion_info
|
||||||
width: 2 * informationPage.columnWidth
|
width: 2 * informationPage.columnWidth
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
height: 0.75 * informationPage.columnWidth
|
||||||
readOnly: !base.editingEnabled;
|
readOnly: !base.editingEnabled
|
||||||
|
|
||||||
onEditingFinished: base.setMetaDataEntry("adhesion_info", properties.adhesion_info, text)
|
onEditingFinished: base.setMetaDataEntry("adhesion_info", properties.adhesion_info, text)
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
Item
|
ScrollView
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
@ -15,17 +15,22 @@ Item
|
|||||||
|
|
||||||
property bool readOnly: false
|
property bool readOnly: false
|
||||||
|
|
||||||
width: textArea.width
|
|
||||||
height: textArea.height
|
|
||||||
|
|
||||||
TextArea
|
TextArea
|
||||||
{
|
{
|
||||||
id: textArea
|
id: textArea
|
||||||
|
|
||||||
enabled: !base.readOnly
|
enabled: !base.readOnly
|
||||||
opacity: base.readOnly ? 0.5 : 1.0
|
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:
|
Keys.onReturnPressed:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user