Improved size calculation of overlay text message

* larger text message overlay
* fixed min.size calculation
This commit is contained in:
Klaus Basan
2018-12-05 06:39:08 +01:00
parent 18788a8d4d
commit 280c9a4e56
5 changed files with 18 additions and 11 deletions

View File

@@ -14,6 +14,7 @@
#include "blackgui/guiutility.h"
#include "blackmisc/aviation/atcstationlist.h"
#include <math.h>
#include <QGridLayout>
#include <QPushButton>
@@ -91,10 +92,13 @@ namespace BlackGui
}
}
const double a = added;
const double c = m_cols;
const int rows = qRound(ceil(a / c)); // row can be too high
if (added > 0)
{
this->setVisible(true);
this->setMinimumHeight(row * 25);
this->setMinimumHeight(rows * 25);
}
}

View File

@@ -664,7 +664,7 @@ namespace BlackGui
ui->comp_AtcStations->setBackgroundUpdates(backgroundUpdates);
}
void CTextMessageComponent::updateAtcButtonStations()
void CTextMessageComponent::updateAtcStationsButtons()
{
ui->comp_AtcStations->updateStations();
}

View File

@@ -90,7 +90,7 @@ namespace BlackGui
void setAtcButtonsBackgroundUpdates(bool backgroundUpdates);
//! Update buttons
void updateAtcButtonStations();
void updateAtcStationsButtons();
signals:
//! Message to be displayed in info window