mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
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:
parent
47ff95b1f3
commit
cdb8020029
7 changed files with 227 additions and 62 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue