mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Merge branch 'master' into CURA-6435_new_style_add_machine
This commit is contained in:
commit
0e49d3dc12
25 changed files with 222 additions and 157 deletions
|
@ -25,12 +25,16 @@ Rectangle
|
|||
Label
|
||||
{
|
||||
id: notificationLabel
|
||||
anchors.centerIn: parent
|
||||
anchors.fill: parent
|
||||
color: UM.Theme.getColor("primary_text")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font: UM.Theme.getFont("small")
|
||||
font: UM.Theme.getFont("default")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
// This is a bit of a hack, but we don't really have enough room for 2 characters (eg 9+). The default font
|
||||
// does have a tad bit to much spacing. So instead of adding a whole new font, we just modify it a bit for this
|
||||
// specific instance.
|
||||
Component.onCompleted: font.letterSpacing = -1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ RadioButton
|
|||
implicitWidth: UM.Theme.getSize("radio_button").width
|
||||
implicitHeight: UM.Theme.getSize("radio_button").height
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.alignWhenCentered: false
|
||||
radius: width / 2
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: radioButton.hovered ? UM.Theme.getColor("small_button_text") : UM.Theme.getColor("small_button_text_hover")
|
||||
|
|
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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,12 +48,22 @@ TextField
|
|||
background: Rectangle
|
||||
{
|
||||
id: backgroundRectangle
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width)
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
|
||||
border.color: UM.Theme.getColor("setting_control_border")
|
||||
|
||||
color: UM.Theme.getColor("setting_control")
|
||||
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