The Felgo Dialog type is too small for many use cases and, as far as I can tell, exposes no way to set its size. It would be more useful if it exposed properties with which I can control the size of the content area of the dialog.
Is there a way to resize the dialog and I’m just missing it?
I just had a look at our implementation of the Dialog – at the moment the content area size is always based on the app-window size.
But there are already two hidden properties that handle the width and height of the dialog’s content area: contentWidth and contentHeight.
You can use these properties for now to modify the size, for example like this:
AppButton {
text: "Custom Dialog"
onClicked: customDialog.open()
}
Dialog {
id: customDialog
title: "Change Dialog Size?"
positiveActionLabel: "Yes"
negativeActionLabel: "No"
onCanceled: close()
onAccepted: image.height = image.height === dp(200) ? dp(50) : dp(200)
// base the content area height (without dialog title and buttons) on the image height
contentHeight: image.height
AppImage { //will be placed inside the dialogs content area
id: image
height: dp(50)
anchors.horizontalCenter: parent.horizontalCenter
source: "../assets/vplay-logo.png"
fillMode: Image.PreserveAspectFit
}
}
Best,
Günther
This reply was modified 8 years, 2 months ago by GT.
This reply was modified 8 years, 2 months ago by GT.
One other thing I note, though. In the default dialog, the “OK” button text is much smaller than the “Cancel” button text. I’m assuming that’s unexpected behavior? Screenshot here: http://ge.tt/5qZ0pzX2
This reply was modified 8 years, 2 months ago by nathan@followmyvote.com. Reason: Make link clickable
I agree that the button text sizes should match for the dialog to look good 😉
Unfortunately I can’t reproduce this issue – which device/platform are you using, or do you apply any special styling settings?
I can’t reproduce it in a trivial demo app either, but I note that the trivial demo app uses the whole canned Felgo qmake project whereas my project uses qbs and may be missing some of the infrastructure the project templates have?
Testing on Linux, with a 15″ 4k display (perhaps the high DPI is causing some fits?)
By signing up, you consent to Felgo processing your data & contacting you to fulfill your request. For more information on how we are committed to protecting & respecting your privacy, please review our privacy policy.
Want to find out if Felgo is a good fit for your company?
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: