From 31d30c2174c1546f047be14ef162a5ecda422fe1 Mon Sep 17 00:00:00 2001 From: IndrekV Date: Fri, 11 May 2018 21:34:57 +0100 Subject: [PATCH] Updated feedback from design and added filesize check and error notices (linux), #2444 --- src/ui/linux/TogglDesktop/feedbackdialog.cpp | 8 +++ src/ui/linux/TogglDesktop/feedbackdialog.ui | 74 ++++++++++++++++---- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/src/ui/linux/TogglDesktop/feedbackdialog.cpp b/src/ui/linux/TogglDesktop/feedbackdialog.cpp index 50141c3225..a9115857c6 100644 --- a/src/ui/linux/TogglDesktop/feedbackdialog.cpp +++ b/src/ui/linux/TogglDesktop/feedbackdialog.cpp @@ -32,12 +32,20 @@ void FeedbackDialog::on_uploadImageButton_clicked() { void FeedbackDialog::on_sendButton_clicked() { QString content = ui->content->toPlainText(); if (content.isEmpty()) { + QMessageBox(QMessageBox::Information, + "Feedback not sent!", + "Please type in your feedback before sending.", + QMessageBox::Ok).exec(); ui->content->setFocus(); return; } if (!TogglApi::instance->sendFeedback(ui->topic->currentText(), ui->content->toPlainText(), path)) { + QMessageBox(QMessageBox::Information, + "Feedback not sent!", + "Please check that file you are sending is not larger than 5MB.", + QMessageBox::Ok).exec(); return; } ui->topic->setCurrentIndex(0); diff --git a/src/ui/linux/TogglDesktop/feedbackdialog.ui b/src/ui/linux/TogglDesktop/feedbackdialog.ui index d49f70eb46..64ca405332 100644 --- a/src/ui/linux/TogglDesktop/feedbackdialog.ui +++ b/src/ui/linux/TogglDesktop/feedbackdialog.ui @@ -35,22 +35,30 @@ - - - (no image selected) + + + + 0 + 0 + - - - - - + + + 0 + + + 6 + + + 0 + + + 6 + - + - Upload image - - - false + (maximum image size 5MB) @@ -68,7 +76,47 @@ + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Upload image + + + false + + + + + + + + + + + 0 + + + 0 + + + + + 100 + 0 + + Send