mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:35:58 +08:00
Add support for loading a custom QML panel to tools and PrinterToolbar
This allows us to provide custom actions dependant on the active tool, like reset rotation or scale to max.
This commit is contained in:
parent
a751a137d9
commit
da0d71fd94
@ -5,9 +5,18 @@ import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.0 as UM
|
||||
|
||||
RowLayout {
|
||||
Item {
|
||||
id: base;
|
||||
|
||||
width: buttons.width;
|
||||
height: buttons.height + panel.height;
|
||||
|
||||
RowLayout {
|
||||
id: buttons;
|
||||
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.left: parent.left;
|
||||
|
||||
spacing: UM.Theme.sizes.default_margin.width * 2;
|
||||
|
||||
Repeater {
|
||||
@ -32,3 +41,17 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: panel
|
||||
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
anchors.bottom: buttons.top;
|
||||
anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
|
||||
|
||||
height: childrenRect.height;
|
||||
|
||||
source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : "";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user