mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 12:02:09 +08:00
cabana: new chart on top (#27031)
old-commit-hash: 945d0c7696e79fd1889743f112d68060c0b67650
This commit is contained in:
@@ -224,11 +224,11 @@ void ChartsWidget::setColumnCount(int n) {
|
||||
|
||||
void ChartsWidget::updateLayout() {
|
||||
int n = column_count;
|
||||
for (; n >= 1; --n) {
|
||||
for (; n > 1; --n) {
|
||||
if ((n * (CHART_MIN_WIDTH + charts_layout->spacing())) < rect().width()) break;
|
||||
}
|
||||
for (int i = 0; i < charts.size(); ++i) {
|
||||
charts_layout->addWidget(charts[i], i / n, i % n);
|
||||
charts_layout->addWidget(charts[charts.size() - i - 1], i / n, i % n);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user