mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Use pointingrectangle for toolbutton tooltips
This commit is contained in:
parent
1d27822970
commit
ec46b49847
4 changed files with 44 additions and 28 deletions
|
@ -353,10 +353,9 @@ UM.MainWindow
|
|||
{
|
||||
id: openFileButton;
|
||||
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
|
||||
//style: UM.Theme.styles.open_file_button
|
||||
text: catalog.i18nc("@action:button","Open File");
|
||||
iconSource: UM.Theme.icons.load
|
||||
style: UM.Theme.styles.open_file_button
|
||||
style: UM.Theme.styles.tool_button
|
||||
tooltip: '';
|
||||
anchors
|
||||
{
|
||||
|
@ -368,6 +367,14 @@ UM.MainWindow
|
|||
action: actions.open;
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onEntered: {
|
||||
buttonTooltip.targetId = parent;
|
||||
mouse.accepted = false;
|
||||
}
|
||||
onExited: {
|
||||
buttonTooltip.targetId = undefined;
|
||||
mouse.accepted = false;
|
||||
}
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
acceptedButtons: Qt.NoButton
|
||||
}
|
||||
|
@ -645,7 +652,7 @@ UM.MainWindow
|
|||
id: openDialog;
|
||||
|
||||
//: File open dialog title
|
||||
title: catalog.i18nc("@title:window","Open File")
|
||||
title: catalog.i18nc("@title:window","Open file")
|
||||
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal;
|
||||
//TODO: Support multiple file selection, workaround bug in KDE file dialog
|
||||
//selectMultiple: true
|
||||
|
|
|
@ -13,7 +13,7 @@ Item {
|
|||
|
||||
width: buttons.width;
|
||||
height: buttons.height
|
||||
property int activeY
|
||||
//property int activeY
|
||||
|
||||
ColumnLayout {
|
||||
id: buttons;
|
||||
|
@ -44,29 +44,21 @@ Item {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||
base.activeY = parent.y
|
||||
//base.activeY = parent.y
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: base.width
|
||||
height: base.height
|
||||
z: parent.z - 1
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: UM.Theme.colors.lining
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: panelBackground;
|
||||
|
||||
anchors.left: parent.right;
|
||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||
anchors.top: parent.top;
|
||||
y: base.activeY
|
||||
//y: base.activeY
|
||||
z: buttons.z -1
|
||||
|
||||
width: {
|
||||
if (panel.item && panel.width > 0){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue