mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 12:15:59 +08:00
Merge pull request #5244 from Ultimaker/CURA-6115-improve-message-options
Cura 6115 improve message options
This commit is contained in:
commit
dcf9ce56e4
@ -28,7 +28,7 @@ class FirmwareUpdateCheckerMessage(Message):
|
|||||||
"[no_icon]",
|
"[no_icon]",
|
||||||
"[no_description]",
|
"[no_description]",
|
||||||
button_style = Message.ActionButtonStyle.LINK,
|
button_style = Message.ActionButtonStyle.LINK,
|
||||||
button_align = Message.ActionButtonStyle.BUTTON_ALIGN_LEFT)
|
button_align = Message.ActionButtonAlignment.ALIGN_LEFT)
|
||||||
|
|
||||||
def getMachineId(self) -> int:
|
def getMachineId(self) -> int:
|
||||||
return self._machine_id
|
return self._machine_id
|
||||||
|
@ -48,12 +48,13 @@ Button
|
|||||||
contentItem: Row
|
contentItem: Row
|
||||||
{
|
{
|
||||||
spacing: UM.Theme.getSize("narrow_margin").width
|
spacing: UM.Theme.getSize("narrow_margin").width
|
||||||
|
height: button.height
|
||||||
//Left side icon. Only displayed if !isIconOnRightSide.
|
//Left side icon. Only displayed if !isIconOnRightSide.
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
id: buttonIconLeft
|
id: buttonIconLeft
|
||||||
source: ""
|
source: ""
|
||||||
height: UM.Theme.getSize("action_button_icon").height
|
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
@ -70,9 +71,11 @@ Button
|
|||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
visible: text != ""
|
visible: text != ""
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
|
height: parent.height
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
|
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +84,7 @@ Button
|
|||||||
{
|
{
|
||||||
id: buttonIconRight
|
id: buttonIconRight
|
||||||
source: buttonIconLeft.source
|
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
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
|
@ -373,6 +373,24 @@ UM.MainWindow
|
|||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,17 +320,9 @@
|
|||||||
"tooltip_text": [255, 255, 255, 255],
|
"tooltip_text": [255, 255, 255, 255],
|
||||||
|
|
||||||
"message_background": [255, 255, 255, 255],
|
"message_background": [255, 255, 255, 255],
|
||||||
"message_shadow": [0, 0, 0, 120],
|
|
||||||
"message_border": [192, 193, 194, 255],
|
"message_border": [192, 193, 194, 255],
|
||||||
"message_text": [0, 0, 0, 255],
|
|
||||||
"message_close": [102, 102, 102, 255],
|
"message_close": [102, 102, 102, 255],
|
||||||
"message_close_hover": [8, 7, 63, 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_background": [245, 245, 245, 255],
|
||||||
"message_progressbar_control": [50, 130, 255, 255],
|
"message_progressbar_control": [50, 130, 255, 255],
|
||||||
|
|
||||||
@ -512,7 +504,7 @@
|
|||||||
"button_icon": [2.5, 2.5],
|
"button_icon": [2.5, 2.5],
|
||||||
"button_lining": [0, 0],
|
"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_icon": [1.0, 1.0],
|
||||||
"action_button_radius": [0.15, 0.15],
|
"action_button_radius": [0.15, 0.15],
|
||||||
|
|
||||||
@ -568,12 +560,8 @@
|
|||||||
|
|
||||||
"message": [30.0, 5.0],
|
"message": [30.0, 5.0],
|
||||||
"message_close": [1, 1],
|
"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_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],
|
"infill_button_margin": [0.5, 0.5],
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user