mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Improved size calculation of overlay text message
* larger text message overlay * fixed min.size calculation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -664,7 +664,7 @@ namespace BlackGui
|
||||
ui->comp_AtcStations->setBackgroundUpdates(backgroundUpdates);
|
||||
}
|
||||
|
||||
void CTextMessageComponent::updateAtcButtonStations()
|
||||
void CTextMessageComponent::updateAtcStationsButtons()
|
||||
{
|
||||
ui->comp_AtcStations->updateStations();
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace BlackGui
|
||||
void setAtcButtonsBackgroundUpdates(bool backgroundUpdates);
|
||||
|
||||
//! Update buttons
|
||||
void updateAtcButtonStations();
|
||||
void updateAtcStationsButtons();
|
||||
|
||||
signals:
|
||||
//! Message to be displayed in info window
|
||||
|
||||
Reference in New Issue
Block a user