Gui: Use system dialogs by default (#24882)
* Fix the selector of the FileDialog and add the same default settings for the ColorDialog. * Add option to set the default ColorDialog * Use system dialog by default * Remove new env var * Fix the native file dialog selector * Adjust env variable name * Adjust env variable name
This commit is contained in:
@@ -53,23 +53,28 @@ using namespace Gui;
|
||||
|
||||
bool DialogOptions::dontUseNativeFileDialog()
|
||||
{
|
||||
#if defined(USE_QT_FILEDIALOG)
|
||||
bool notNativeDialog = true;
|
||||
#if defined(USE_QT_DIALOGS)
|
||||
constexpr bool notNativeDialog = true;
|
||||
#else
|
||||
bool notNativeDialog = false;
|
||||
constexpr bool notNativeDialog = false;
|
||||
#endif
|
||||
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Dialog");
|
||||
notNativeDialog = group->GetBool("DontUseNativeDialog", notNativeDialog);
|
||||
return notNativeDialog;
|
||||
return group->GetBool("DontUseNativeDialog", notNativeDialog);
|
||||
}
|
||||
|
||||
bool DialogOptions::dontUseNativeColorDialog()
|
||||
{
|
||||
#if defined(USE_QT_DIALOGS)
|
||||
constexpr bool notNativeDialog = true;
|
||||
#else
|
||||
constexpr bool notNativeDialog = false;
|
||||
#endif
|
||||
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Dialog");
|
||||
return group->GetBool("DontUseNativeColorDialog", true);
|
||||
return group->GetBool("DontUseNativeColorDialog", notNativeDialog);
|
||||
}
|
||||
|
||||
/* TRANSLATOR Gui::FileDialog */
|
||||
|
||||
Reference in New Issue
Block a user