void ViewerToolbar::paintEvent(QPaintEvent* theEvent)
{
- QApplication::syncX();
- printf("### ViewerToolbar::paintEvent\n");
+ //QApplication::syncX();
+ //printf("### ViewerToolbar::paintEvent\n");
//QToolBar::paintEvent(theEvent);
// Paint background
QPainter aPainter(this);
int aNewH = int(aH / aR);
myPicture->setPixmap(aPMap.scaled(100, aNewH));
- myLastState = isMaximized() ? MaximizedState : WindowNormalState;
+ myLastState = (isMaximized() || parentWidget()->isMaximized()) ? MaximizedState : WindowNormalState;
//parentWidget()->showMinimized();
showMinimized();
parentWidget()->setGeometry(parentWidget()->x(), parentWidget()->y(), 100, aNewH);
//****************************************************************
void XGUI_ViewWindow::onMaximize()
{
- if (isMaximized()) {
+ if (isMaximized() || parentWidget()->isMaximized()) {
myMaximizeBtn->setIcon(MaximizeIco);
myGripWgt->show();
showNormal();
+ parentWidget()->showNormal();
} else {
myMaximizeBtn->setIcon(RestoreIco);
myGripWgt->hide();