Merge branch 'master' into CURA-6435_new_style_add_machine

This commit is contained in:
Lipu Fei 2019-04-10 09:06:55 +02:00 committed by GitHub
commit 0e49d3dc12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 222 additions and 157 deletions

View file

@ -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
}
}

View file

@ -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")

View 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
}
}
}

View file

@ -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")
}
}
}