mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-05 23:04:30 +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 {
|
||||
id: base;
|
||||
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
|
||||
|
||||
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 : "";
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ UM.AngledCornerRectangle {
|
||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||
|
||||
function showTooltip(item, position, text) {
|
||||
print("omg zomg")
|
||||
tooltip.text = text;
|
||||
position = item.mapToItem(base, position.x, position.y);
|
||||
tooltip.show(position);
|
||||
@ -72,16 +71,19 @@ UM.AngledCornerRectangle {
|
||||
|
||||
onLoaded:
|
||||
{
|
||||
if(item) item.configureSettings = base.configureMachinesAction;
|
||||
if(typeof(item.onShowTooltip) != 'undefined')
|
||||
if(item)
|
||||
{
|
||||
item.configureSettings = base.configureMachinesAction;
|
||||
if(item.onShowTooltip != undefined)
|
||||
{
|
||||
item.showTooltip.connect(base.showTooltip)
|
||||
}
|
||||
|
||||
if(item.onHideTooltip != undefined)
|
||||
{
|
||||
item.hideTooltip.connect(base.hideTooltip)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//onShowTooltip: base.showTooltip(item,position,text)
|
||||
//onHideTooltip: base.hideTooltip()
|
||||
}
|
||||
|
||||
SaveButton {
|
||||
|
@ -110,7 +110,7 @@ Column {
|
||||
height: UM.Theme.sizes.section.height;
|
||||
|
||||
iconSource: UM.Theme.icons.printsetup;
|
||||
text: qsTr("Setup");
|
||||
text: qsTr("Print Setup");
|
||||
enabled: false;
|
||||
|
||||
color: UM.Theme.colors.primary;
|
||||
|
Loading…
x
Reference in New Issue
Block a user