mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Document where the magic numbers come from
For the maximumSize of a button. Contributes to CURA-6412.
This commit is contained in:
parent
a793a06b60
commit
742329a170
1 changed files with 6 additions and 2 deletions
|
@ -159,7 +159,9 @@ Cura.ExpandablePopup
|
|||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@button", "Add printer")
|
||||
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - 2.5 * UM.Theme.getSize("default_margin").width
|
||||
// The maximum width of the button is half of the total space, minus the padding of the parent, the left
|
||||
// padding of the component and half the spacing because of the space between buttons.
|
||||
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - parent.padding - leftPadding - parent.spacing / 2
|
||||
onClicked:
|
||||
{
|
||||
toggleContent()
|
||||
|
@ -172,7 +174,9 @@ Cura.ExpandablePopup
|
|||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@button", "Manage printers")
|
||||
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - 2.5 * UM.Theme.getSize("default_margin").width
|
||||
// The maximum width of the button is half of the total space, minus the padding of the parent, the right
|
||||
// padding of the component and half the spacing because of the space between buttons.
|
||||
maximumWidth: UM.Theme.getSize("machine_selector_widget_content").width / 2 - parent.padding - rightPadding - parent.spacing / 2
|
||||
onClicked:
|
||||
{
|
||||
toggleContent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue