Revert "Fix binding loop in action panel widget"

Fix improper player slider layout which was introduced in 5cfe71e5
This commit is contained in:
Nino van Hooff 2020-04-02 15:15:05 +02:00
parent cbccb08103
commit 6d56b52913
2 changed files with 11 additions and 1 deletions

View file

@ -49,6 +49,15 @@ Button
height: UM.Theme.getSize("action_button").height
hoverEnabled: true
Component.onCompleted: {
if(fixedWidthMode){
buttonText.width = width - leftPadding - rightPadding
} else {
buttonText.width = (maximumWidth != 0 && contentWidth > maximumWidth) ? maximumWidth : undefined
}
}
contentItem: Row
{
spacing: UM.Theme.getSize("narrow_margin").width
@ -84,9 +93,9 @@ Button
font: UM.Theme.getFont("medium")
visible: text != ""
renderType: Text.NativeRendering
// width is set by parent because it depends on button.fixedWidthMode
height: parent.height
anchors.verticalCenter: parent.verticalCenter
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : ((maximumWidth != 0 && contentWidth > maximumWidth) ? maximumWidth : undefined)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight

View file

@ -15,6 +15,7 @@ import Cura 1.0 as Cura
Item
{
id: base
width: actionPanelWidget.width + additionalComponents.width
height: childrenRect.height
visible: CuraApplication.platformActivity