Merge pull request #5244 from Ultimaker/CURA-6115-improve-message-options

Cura 6115 improve message options
This commit is contained in:
Remco Burema 2019-01-30 17:54:47 +01:00 committed by GitHub
commit dcf9ce56e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 17 deletions

View file

@ -48,12 +48,13 @@ Button
contentItem: Row
{
spacing: UM.Theme.getSize("narrow_margin").width
height: button.height
//Left side icon. Only displayed if !isIconOnRightSide.
UM.RecolorImage
{
id: buttonIconLeft
source: ""
height: UM.Theme.getSize("action_button_icon").height
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height
@ -70,9 +71,11 @@ Button
font: UM.Theme.getFont("medium")
visible: text != ""
renderType: Text.NativeRendering
height: parent.height
anchors.verticalCenter: parent.verticalCenter
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
@ -81,7 +84,7 @@ Button
{
id: buttonIconRight
source: buttonIconLeft.source
height: UM.Theme.getSize("action_button_icon").height
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height

View file

@ -373,6 +373,24 @@ UM.MainWindow
bottom: parent.bottom
bottomMargin: UM.Theme.getSize("default_margin").height
}
primaryButton: Component
{
Cura.PrimaryButton
{
text: model.name
height: UM.Theme.getSize("message_action_button").height
}
}
secondaryButton: Component
{
Cura.SecondaryButton
{
text: model.name
height: UM.Theme.getSize("message_action_button").height
}
}
}
}

View file

@ -320,17 +320,9 @@
"tooltip_text": [255, 255, 255, 255],
"message_background": [255, 255, 255, 255],
"message_shadow": [0, 0, 0, 120],
"message_border": [192, 193, 194, 255],
"message_text": [0, 0, 0, 255],
"message_close": [102, 102, 102, 255],
"message_close_hover": [8, 7, 63, 255],
"message_button": [38, 113, 231, 255],
"message_button_hover": [81, 145, 247, 255],
"message_button_active": [38, 113, 231, 255],
"message_button_text": [255, 255, 255, 255],
"message_button_text_hover": [255, 255, 255, 255],
"message_button_text_active": [255, 255, 255, 255],
"message_progressbar_background": [245, 245, 245, 255],
"message_progressbar_control": [50, 130, 255, 255],
@ -512,7 +504,7 @@
"button_icon": [2.5, 2.5],
"button_lining": [0, 0],
"action_button": [15.0, 3.0],
"action_button": [15.0, 2.5],
"action_button_icon": [1.0, 1.0],
"action_button_radius": [0.15, 0.15],
@ -568,12 +560,8 @@
"message": [30.0, 5.0],
"message_close": [1, 1],
"message_button": [6.0, 1.8],
"message_shadow": [0, 0],
"message_margin": [0, 1.0],
"message_inner_margin": [1.5, 1.5],
"message_radius": [0.25, 0.25],
"message_button_radius": [0.15, 0.15],
"message_action_button": [0, 2.0],
"infill_button_margin": [0.5, 0.5],