Skip to content

Commit

Permalink
Remove deprecated showIndicatorPopup
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Jan 6, 2025
1 parent 6ae9ff8 commit 4535272
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions src/UI/MainRootWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -659,57 +659,6 @@ ApplicationWindow {
}
}

//-------------------------------------------------------------------------
//-- Indicator Popups - deprecated, use Indicator Drawer instead

function showIndicatorPopup(item, dropItem, dim = true) {
indicatorPopup.currentIndicator = dropItem
indicatorPopup.currentItem = item
indicatorPopup.dim = dim
indicatorPopup.open()
}

function hideIndicatorPopup() {
indicatorPopup.close()
indicatorPopup.currentItem = null
indicatorPopup.currentIndicator = null
}

Popup {
id: indicatorPopup
padding: ScreenTools.defaultFontPixelWidth * 0.75
modal: true
focus: true
dim: false
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
property var currentItem: null
property var currentIndicator: null
y: ScreenTools.toolbarHeight

background: Rectangle {
width: loader.width
height: loader.height
color: Qt.rgba(0,0,0,0)
}
Loader {
id: loader
onLoaded: {
var centerX = mainWindow.contentItem.mapFromItem(indicatorPopup.currentItem, 0, 0).x - (loader.width * 0.5)
if((centerX + indicatorPopup.width) > (mainWindow.width - ScreenTools.defaultFontPixelWidth)) {
centerX = mainWindow.width - indicatorPopup.width - ScreenTools.defaultFontPixelWidth
}
indicatorPopup.x = centerX
}
}
onOpened: {
loader.sourceComponent = indicatorPopup.currentIndicator
}
onClosed: {
loader.sourceComponent = null
indicatorPopup.currentIndicator = null
}
}

//-------------------------------------------------------------------------
//-- Indicator Drawer

Expand Down

0 comments on commit 4535272

Please sign in to comment.