Telemetry: some UI fixes

This commit is contained in:
Nicolas Mailloux 2024-01-10 13:05:04 -05:00
parent c30fdcc85b
commit f2a8d5ce57
2 changed files with 16 additions and 3 deletions

View file

@ -1093,6 +1093,9 @@ void MainWindow::on_audioBtn_clicked()
void MainWindow::openTelemetryDialog() {
log("Showing telemetry request dialog", className);
// Preventing a small race condition
global::usbms::usbmsDialog = false;
global::telemetry::telemetryDialog = true;
generalDialogWindow = new generalDialog(this);

View file

@ -231,7 +231,7 @@ generalDialog::generalDialog(QWidget *parent) :
ui->stackedWidget->setCurrentIndex(0);
ui->okBtn->setText("Send");
ui->cancelBtn->setText("Don't send");
ui->bodyLabel->setText("<font face='u001'>We, InkBox OS developers, would like to know a bit more about our userbase.<br>We will be extremely grateful if you allow us to collect some information about your device.<br>Would you like to send it to us</font><font face='Inter'>?</font><font face='u001'><br>No personal data will be transmitted.</font>");
ui->bodyLabel->setText("<font face='u001'>We, the InkBox OS developers, would like to know a bit more about our userbase.<br>We would be extremely grateful if you would allow us to collect some information about your device.<br>Would you like to send it to us</font><font face='Inter'>?</font><font face='u001'><br>No personal data will be transmitted.</font>");
ui->headerLabel->setText("Telemetry request");
QTimer::singleShot(50, this, SLOT(adjust_size()));
}
@ -624,8 +624,18 @@ void generalDialog::adjust_size() {
float widthProportion = 2;
float heightProportion = 2;
if(telemetryDialog) {
widthProportion = 2.8;
heightProportion = 2.6;
if(global::deviceID == "n705\n") {
widthProportion = 3.3;
heightProportion = 2.6;
}
else if(global::deviceID == "n873\n") {
widthProportion = 3;
heightProportion = 2.6;
}
else {
widthProportion = 3.4;
heightProportion = 2.6;
}
}
this->adjustSize();