Skip to content

Commit

Permalink
Displays the "OK" button for the message box.
Browse files Browse the repository at this point in the history
  • Loading branch information
ic005k committed Aug 28, 2024
1 parent 406a411 commit ac4efd7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http:// schemas.android.com/ tools" package="com.x" android:installLocation="auto"
android:versionCode="1" android:versionName="1.2.03">
android:versionCode="1" android:versionName="1.2.04">
<!-- The following comment will be replaced upon deployment with default permissions based on
the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
Expand Down
14 changes: 6 additions & 8 deletions src/Comm/ShowMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ bool ShowMessage::eventFilter(QObject* watch, QEvent* evn) {
}

if (evn->type() == QEvent::MouseButtonPress) {
if (ui->btnCancel->isHidden() && ui->btnCopy->isHidden() &&
ui->btnOk->isHidden()) {
if (btn_count == 0) {
on_btnCancel_clicked();
}

Expand Down Expand Up @@ -111,11 +110,8 @@ void ShowMessage::init() {

int nEditH = mw_one->m_Todo->getEditTextHeight(ui->editMsg);
int nH = 0;
if (!ui->btnCancel->isHidden())
nH = nEditH + ui->btnCancel->height() + ui->lblTitle->height() +
ui->hframe->height() + 40;
else
nH = nEditH + ui->lblTitle->height() + ui->hframe->height() + 50;
nH = nEditH + ui->btnCancel->height() + ui->lblTitle->height() +
ui->hframe->height() + 50;

if (nH > mw_one->height()) nH = mw_one->height() - 10;
ui->frame->setFixedHeight(nH);
Expand All @@ -138,7 +134,7 @@ bool ShowMessage::showMsg(QString title, QString msgtxt, int btnCount) {
if (btnCount == 0) {
ui->btnCancel->hide();
ui->btnCopy->hide();
ui->btnOk->hide();
ui->btnOk->show();
ui->btnDel->hide();
}
if (btnCount == 1) {
Expand Down Expand Up @@ -168,6 +164,8 @@ bool ShowMessage::showMsg(QString title, QString msgtxt, int btnCount) {
ui->btnDel->show();
}

btn_count = btnCount;

ui->lblTitle->setText(title);
ui->editMsg->setText(msgtxt);

Expand Down
1 change: 1 addition & 0 deletions src/Comm/ShowMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ShowMessage : public QDialog {

private:
void init();
int btn_count = 0;
};

#endif // SHOWMESSAGE_H
2 changes: 1 addition & 1 deletion src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
QList<QPointF> PointList;
QList<double> doubleList;

QString ver = "1.2.03";
QString ver = "1.2.04";
QGridLayout *gl1;
QTreeWidgetItem *parentItem;
bool isrbFreq = true;
Expand Down

0 comments on commit ac4efd7

Please sign in to comment.