// LtgLogoButton.qml
import QtQuick 6.5
import QtQuick.Controls.Fusion 6.5

// Inherit directly from Button
Button {
	id: logoButton
	
	property string ltgItemType: "button" // For tutorials
	
	width: 30
	height: width
		
	anchors.bottom: parent.bottom
	anchors.left: parent.left
	anchors.margins: width*.5
	
	flat: true // To disable the change of button color when hovering the mouse over the button
	

	contentItem: Image {
		source: "logo64.png"	
		anchors.fill: parent		
		fillMode: Image.PreserveAspectFit
	}

	// Action when clicked
	onClicked: {
		//console.log("Image button clicked!")
		// You can add a function here
	}
		
	// Right click handler (context menu)
    MouseArea {
        anchors.fill: logoButton
        acceptedButtons: Qt.RightButton
		onClicked: (mouse) => {
            if (parent.ltgType != "") {
                ltgMenuHandler.showContextQmlFileMenu(Qt.point(mouse.x, mouse.y));
            }
        }
    }

	
	
	
}


