chore : Add message box for advise use hpdi round factor is unsafe

Add a message box to advise user that use a hdpi round factor can cause
strange render according to :
1 - the selected value
2 - the dpi of the screen
3 - Edit the project on another computer and/or screen who don't have
the same parameters as point 1 and 2.
This commit is contained in:
joshua
2025-11-14 21:23:29 +01:00
parent 3803834d6d
commit 4e695de914
3 changed files with 48 additions and 5 deletions

View File

@@ -21,6 +21,7 @@
#include "../../qeticons.h"
#include "ui_generalconfigurationpage.h"
#include "../../utils/qetsettings.h"
#include "../../qetmessagebox.h"
#include <QFileDialog>
#include <QFontDialog>
@@ -560,3 +561,29 @@ void GeneralConfigurationPage::on_ElementEditor_Grid_PointSize_min_sb_valueChang
{
ui->ElementEditor_Grid_PointSize_max_sb->setMinimum(std::max(1, value));
}
void GeneralConfigurationPage::on_m_hdpi_round_cb_clicked(bool checked)
{
if (checked) {
if (QMessageBox::Cancel == QET::QetMessageBox::warning(
this,
tr("Fonctionnalité expérimental"),
tr("AVERTISSEMENT :\n"
"Toutes valeurs autre que Pas darrondi peut causer des erreurs de rendu "
"du projet en fonction de :\n\n"
"1 - la valeur sélectionnée \n"
"2 - du dpi de l'écran \n"
"3 - Modifier le projet sur un autre ordinateur et/ou écran n'ayant pas les mêmes paramètres des points 1 et 2."),
QMessageBox::StandardButton::Cancel|QMessageBox::StandardButton::Ok,
QMessageBox::StandardButton::Cancel
)) {
ui->m_hdpi_round_cb->blockSignals(true);
ui->m_hdpi_round_cb->setChecked(false);
ui->m_hdpi_round_cb->blockSignals(false);
return;
}
}
ui->m_hdpi_round_label->setEnabled(checked);
ui->m_hdpi_round_policy_cb->setEnabled(checked);
}