From eb7ab657fe985bbca11b883f216eeb55cc727f4b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 15 Feb 2022 16:26:58 +0100 Subject: [PATCH] Use Cura.Textfield in readonlyTextfield Less code duplication, which is always good CURA-8685 --- resources/qml/Preferences/ReadOnlyTextField.qml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/resources/qml/Preferences/ReadOnlyTextField.qml b/resources/qml/Preferences/ReadOnlyTextField.qml index cc8e83647b..57789cea3c 100644 --- a/resources/qml/Preferences/ReadOnlyTextField.qml +++ b/resources/qml/Preferences/ReadOnlyTextField.qml @@ -5,6 +5,7 @@ import QtQuick 2.1 import QtQuick.Controls 2.1 import UM 1.5 as UM +import Cura 1.0 as Cura Item { @@ -19,23 +20,16 @@ Item width: textField.width height: textField.height - TextField + Cura.TextField { id: textField enabled: !base.readOnly - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") anchors.fill: parent onEditingFinished: base.editingFinished() Keys.onEnterPressed: base.editingFinished() Keys.onReturnPressed: base.editingFinished() - background: Rectangle - { - radius: UM.Theme.getSize("setting_control_radius").width - color: textField.enabled ? UM.Theme.getColor("setting_control") : UM.Theme.getColor("setting_control_disabled") - } } }