Add another expandable component

Use one of them if the drop-panel has to act as a Popup and the other if it has to act as a standard component.

Contributes to CURA-5941.
This commit is contained in:
Diego Prado Gesto 2018-12-05 09:39:04 +01:00
parent 47ff95b1f3
commit cdb8020029
7 changed files with 227 additions and 62 deletions

View file

@ -7,12 +7,12 @@ import QtQuick.Controls 2.3
import UM 1.2 as UM
import Cura 1.0 as Cura
Cura.ExpandableComponent
Cura.ExpandablePopup
{
id: viewSelector
contentPadding: UM.Theme.getSize("default_lining").width
contentAlignment: Cura.ExpandableComponent.ContentAlignment.AlignLeft
contentAlignment: Cura.ExpandablePopup.ContentAlignment.AlignLeft
property var viewModel: UM.ViewModel { }
@ -72,13 +72,13 @@ Cura.ExpandableComponent
contentItem: Column
{
id: viewSelectorPopup
width: viewSelector.width - 2 * viewSelector.popupPadding
width: viewSelector.width - 2 * viewSelector.contentPadding
// For some reason the height/width of the column gets set to 0 if this is not set...
Component.onCompleted:
{
height = implicitHeight
width = viewSelector.width - 2 * viewSelector.popupPadding
width = viewSelector.width - 2 * viewSelector.contentPadding
}
Repeater