hide close buttons in previews when dropping files

pull/1/head
Michail Vourlakos 8 years ago
parent 45fb9466a5
commit 6f54efeded

@ -675,7 +675,7 @@ MouseArea{
if ((windowsPreviewDlg.visualParent === mainItemContainer)&&(windowsPreviewDlg.visible)) {
windowsPreviewDlg.hide();
} else {
preparePreviewWindow();
preparePreviewWindow(false);
windowsPreviewDlg.show();
}
}
@ -733,12 +733,14 @@ MouseArea{
///// Helper functions /////
function preparePreviewWindow(){
function preparePreviewWindow(hideClose){
windowsPreviewDlg.visualParent = mainItemContainer;
toolTipDelegate.parentTask = mainItemContainer;
toolTipDelegate.parentIndex = itemIndex;
toolTipDelegate.hideCloseButtons = hideClose;
toolTipDelegate.appName = Qt.binding(function() {
return model.AppName;
});
@ -867,7 +869,7 @@ MouseArea{
function slotShowPreviewForTasks(group) {
if (group === mainItemContainer) {
preparePreviewWindow();
preparePreviewWindow(true);
windowsPreviewDlg.show();
}
}
@ -1031,7 +1033,7 @@ MouseArea{
onTriggered: {
if(mainItemContainer.containsMouse){
// console.log("Hovered Timer....");
mainItemContainer.preparePreviewWindow();
mainItemContainer.preparePreviewWindow(false);
windowsPreviewDlg.show();
//windowsPreviewDlg.visible = true;
}

@ -42,6 +42,7 @@ PlasmaExtras.ScrollArea {
property string appName
property int pidParent
property bool isGroup
property bool hideCloseButtons
property var windows
readonly property bool isWin: windows !== undefined

@ -139,7 +139,7 @@ Column {
height: units.iconSizes.smallMedium
width: height
visible: isWin
visible: isWin && !hideCloseButtons
acceptedButtons: Qt.LeftButton
hoverEnabled: true

Loading…
Cancel
Save