iSettings->qsettings()->value("search_desclong",false).toBool() );
#ifdef Q_WS_MAEMO_5
- this->setAttribute(Qt::WA_Maemo5StackedWindow);
if( !iSettings->qsettings()->value("disable_autorotation",false).toBool() ) {
this->setAttribute(Qt::WA_Maemo5AutoOrientation);
} else {
this->setAttribute(Qt::WA_Maemo5LandscapeOrientation);
}
+ this->setAttribute(Qt::WA_Maemo5StackedWindow);
#endif
iDimmer = new dimmer(this);
installing_blacklisted = true;
}
#ifdef Q_WS_MAEMO_5
- if( pkg && pkg->maemoDisplayName()=="Maemo 5" ) {
+ if( pkg && pkg->maemoDisplayName()=="Maemo 5" ) { // unreliable?
warn_system_package_install = true;
}
#endif
}
}
+void MainWindow::resizeEvent(QResizeEvent* event)
+{
+ QRect sg = ui->listWidget->rect();
+
+ if( sg.width() > sg.height() ) {
+ ui->listWidget->setGridSize( QSize((sg.width()-12)/5, (sg.height()-12)/2) );
+ } else {
+ ui->listWidget->setGridSize( QSize((sg.width()-12)/3, (sg.height()-12)/3) );
+ }
+
+ if( iDimmer ) {
+ iDimmer->resize( this->size() );
+ }
+
+ QMainWindow::resizeEvent(event);
+}
+
void MainWindow::orientationChanged()
{
- if( QApplication::desktop()->width() > QApplication::desktop()->height() )
- ui->listWidget->setGridSize( QSize((ui->listWidget->width()-12)/5, (ui->listWidget->height()-12)/2) );
- else
- ui->listWidget->setGridSize( QSize((ui->listWidget->width()-12)/3, (ui->listWidget->height()-12)/3) );
}