Better positioning of the plus sign icons in the Equip. tab

There are a couple of problems with said icons:
- When the Equip. tab is first seen, no relative event is monitored
so that the correct position is updated and the icons are positioned.

To solve that we connect the signal MainTab::currentChanged(int)
and call MainTab::equipmentPlusUpdate().

- When the info-profile QSplitter resizes with a snap towards/from
the edges of the main window, no resize handler is called such as
MainTab::resizeEvent().

A solution is to monitor the resize of the info-profile splitter
with MainWindow::on_infoProfileSplitter_splitterMoved() and again
call MainTab::equipmentPlusUpdate()

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2013-06-27 15:33:43 +03:00 committed by Dirk Hohndel
parent 937fef819a
commit 8678e2d57c
4 changed files with 30 additions and 8 deletions

View file

@ -299,6 +299,12 @@ void MainWindow::on_actionYearlyStatistics_triggered()
view->show();
}
void MainWindow::on_infoProfileSplitter_splitterMoved(int pos, int idx)
{
/* always update the floating plus sign icons in the equipment tab */
ui->InfoWidget->equipmentPlusUpdate();
}
/**
* So, here's the deal.
* We have a few QSplitters that takes care of helping us with the