mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:49:03 +08:00
15.10 re-alignment of the toolbar
This is a test to be reviewed Contributes to: issue CURA-60
This commit is contained in:
parent
26c46eb56a
commit
3d5f4e6bd6
@ -304,9 +304,12 @@ UM.MainWindow {
|
|||||||
id: toolbar;
|
id: toolbar;
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
left: parent.left
|
||||||
horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width / 2)
|
top: parent.top
|
||||||
top: parent.top;
|
topMargin: 74
|
||||||
|
//horizontalCenter: parent.horizontalCenter
|
||||||
|
//horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width / 2)
|
||||||
|
//top: parent.top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,8 +13,9 @@ Item {
|
|||||||
|
|
||||||
width: buttons.width;
|
width: buttons.width;
|
||||||
height: buttons.height
|
height: buttons.height
|
||||||
|
property int activeY
|
||||||
|
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
id: buttons;
|
id: buttons;
|
||||||
|
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
@ -39,26 +40,30 @@ Item {
|
|||||||
//just catch the click so we do not trigger that behaviour.
|
//just catch the click so we do not trigger that behaviour.
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
onClicked: parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
onClicked: {
|
||||||
|
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||||
|
base.activeY = parent.y
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: base.width - 10
|
width: base.width
|
||||||
height: base.height
|
height: base.height
|
||||||
z: parent.z - 1
|
z: parent.z - 1
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
color: UM.Theme.colors.lining
|
color: UM.Theme.colors.lining
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: panelBackground;
|
id: panelBackground;
|
||||||
|
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.right;
|
||||||
anchors.top: buttons.bottom;
|
y: base.activeY
|
||||||
|
|
||||||
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) : 0;
|
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) : 0;
|
||||||
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
|
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
|
||||||
|
@ -67,11 +67,14 @@ QtObject {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: tool_button_background
|
id: tool_button_background
|
||||||
anchors.top: parent.bottom
|
anchors.left: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
//anchors.top: parent.bottom
|
||||||
|
|
||||||
width: label.width > parent.width ? label.width : parent.width
|
//width: label.width > parent.width ? label.width : parent.width
|
||||||
height: control.hovered ? label.height : 0;
|
width: control.hovered ? label.width : 0;
|
||||||
Behavior on height { NumberAnimation { duration: 100; } }
|
height: label.height
|
||||||
|
Behavior on width { NumberAnimation { duration: 100; } }
|
||||||
|
|
||||||
opacity: control.hovered ? 1.0 : 0.0;
|
opacity: control.hovered ? 1.0 : 0.0;
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user