mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-06 07:14:20 +08:00
Merge branch 'master' of https://github.com/Ultimaker/PluggableCura
This commit is contained in:
commit
e8dc563c46
@ -8,22 +8,4 @@ import UM 1.0 as UM
|
|||||||
Button {
|
Button {
|
||||||
id: base;
|
id: base;
|
||||||
style: UM.Theme.styles.tool_button;
|
style: UM.Theme.styles.tool_button;
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.bottom: parent.top;
|
|
||||||
|
|
||||||
width: parent.width;
|
|
||||||
height: base.hovered ? label.height : 0;
|
|
||||||
Behavior on height { NumberAnimation { duration: 75; } }
|
|
||||||
|
|
||||||
opacity: base.hovered ? 1.0 : 0.0;
|
|
||||||
Behavior on opacity { NumberAnimation { duration: 75; } }
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: label
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
|
||||||
text: base.text;
|
|
||||||
font: UM.Theme.fonts.button_tooltip;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,18 @@ import QtQuick.Layouts 1.1
|
|||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
RowLayout {
|
Item {
|
||||||
id: base;
|
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;
|
spacing: UM.Theme.sizes.default_margin.width * 2;
|
||||||
|
|
||||||
Repeater {
|
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 : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -15,7 +15,6 @@ UM.AngledCornerRectangle {
|
|||||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||||
|
|
||||||
function showTooltip(item, position, text) {
|
function showTooltip(item, position, text) {
|
||||||
print("omg zomg")
|
|
||||||
tooltip.text = text;
|
tooltip.text = text;
|
||||||
position = item.mapToItem(base, position.x, position.y);
|
position = item.mapToItem(base, position.x, position.y);
|
||||||
tooltip.show(position);
|
tooltip.show(position);
|
||||||
@ -72,16 +71,19 @@ UM.AngledCornerRectangle {
|
|||||||
|
|
||||||
onLoaded:
|
onLoaded:
|
||||||
{
|
{
|
||||||
if(item) item.configureSettings = base.configureMachinesAction;
|
if(item)
|
||||||
if(typeof(item.onShowTooltip) != 'undefined')
|
{
|
||||||
|
item.configureSettings = base.configureMachinesAction;
|
||||||
|
if(item.onShowTooltip != undefined)
|
||||||
{
|
{
|
||||||
item.showTooltip.connect(base.showTooltip)
|
item.showTooltip.connect(base.showTooltip)
|
||||||
}
|
}
|
||||||
|
if(item.onHideTooltip != undefined)
|
||||||
|
{
|
||||||
|
item.hideTooltip.connect(base.hideTooltip)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//onShowTooltip: base.showTooltip(item,position,text)
|
|
||||||
//onHideTooltip: base.hideTooltip()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveButton {
|
SaveButton {
|
||||||
|
@ -110,7 +110,7 @@ Column {
|
|||||||
height: UM.Theme.sizes.section.height;
|
height: UM.Theme.sizes.section.height;
|
||||||
|
|
||||||
iconSource: UM.Theme.icons.printsetup;
|
iconSource: UM.Theme.icons.printsetup;
|
||||||
text: qsTr("Setup");
|
text: qsTr("Print Setup");
|
||||||
enabled: false;
|
enabled: false;
|
||||||
|
|
||||||
color: UM.Theme.colors.primary;
|
color: UM.Theme.colors.primary;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user