Commit 6cc84cd5 authored by Gus Grubba's avatar Gus Grubba

Avoid showing drop down indicator past the end of the window

parent 349c63d9
......@@ -575,7 +575,11 @@ ApplicationWindow {
Loader {
id: loader
onLoaded: {
indicatorDropdown.x = mainWindow.contentItem.mapFromItem(indicatorDropdown.currentItem, 0, 0).x - (loader.width * 0.5)
var centerX = mainWindow.contentItem.mapFromItem(indicatorDropdown.currentItem, 0, 0).x - (loader.width * 0.5)
if((centerX + indicatorDropdown.width) > (mainWindow.width - ScreenTools.defaultFontPixelWidth)) {
centerX = mainWindow.width - indicatorDropdown.width - ScreenTools.defaultFontPixelWidth
}
indicatorDropdown.x = centerX
}
}
onOpened: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment