Hi Bas,
we do not allow to modify the debug menu bar with custom resolutions at the moment.
But you can implement your own solution with a small workaround:
import Felgo 3.0
import QtQuick 2.0
import QtQuick.Window 2.2
App {
id: app
// resize window on button click
AppButton {
text: "Resize Window"
// properties of new target device (e.g. values that match iPhone 6)
property real deviceWidth: 750
property real deviceHeight: 1334
property int deviceDpi: 326
// set new window size and uiScale on button click
onClicked: {
// calculate scale-factor to fit window on screen if width/height too big for screen (for landscape or portrait)
var targetWidth = app.width < app.height ? deviceWidth : deviceHeight
var targetHeight = app.width < app.height ? deviceHeight : deviceWidth
var windowScale = Math.min(Math.round(Screen.desktopAvailableWidth * 0.9) / targetWidth, Math.round(Screen.desktopAvailableHeight * 0.9) / targetHeight, 1.0)
// set new size and uiScale
app.setScreenSize(Math.round(targetWidth * windowScale), Math.round(targetHeight * windowScale)) // resize window
app.uiScale = deviceDpi / (Screen.pixelDensity * 25.4) * windowScale // resize UI to match device dpi
}
}
}
Cheers,
Günther