mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Merge remote-tracking branch 'origin/CURA-6057_fix_onboarding' into CURA-6447_fix_start_onboarding
This commit is contained in:
commit
738886b4fb
14 changed files with 216 additions and 136 deletions
32
resources/qml/Widgets/ScrollableTextArea.qml
Normal file
32
resources/qml/Widgets/ScrollableTextArea.qml
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
//
|
||||
// Cura-style TextArea with scrolls
|
||||
//
|
||||
ScrollView
|
||||
{
|
||||
property alias textArea: _textArea
|
||||
|
||||
TextArea
|
||||
{
|
||||
id: _textArea
|
||||
font: UM.Theme.getFont("default")
|
||||
textFormat: TextEdit.PlainText
|
||||
renderType: Text.NativeRendering
|
||||
selectByMouse: true
|
||||
|
||||
background: Rectangle // Border
|
||||
{
|
||||
border.color: UM.Theme.getColor("lining")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
}
|
||||
}
|
||||
}
|
47
resources/qml/Widgets/TextField.qml
Normal file
47
resources/qml/Widgets/TextField.qml
Normal file
|
@ -0,0 +1,47 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
//
|
||||
// Cura-style TextField
|
||||
//
|
||||
TextField
|
||||
{
|
||||
id: textField
|
||||
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
property int controlWidth: UM.Theme.getSize("setting_control").width
|
||||
property int controlHeight: UM.Theme.getSize("setting_control").height
|
||||
|
||||
hoverEnabled: true
|
||||
selectByMouse: true
|
||||
font: UM.Theme.getFont("default")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width)
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
|
||||
border.color:
|
||||
{
|
||||
if (!textField.enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if (textField.hovered || textField.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue