| 3931 | } |
| 3932 | |
| 3933 | void NetHackQtMainWindow::layout() |
| 3934 | { |
| 3935 | if ( qt_compact_mode ) |
| 3936 | return; |
| 3937 | if (message && map && status) { |
| 3938 | QSize maxs=map->Widget()->maximumSize(); |
| 3939 | int maph=QMIN(height()*2/3,maxs.height()); |
| 3940 | |
| 3941 | QWidget* c = centralWidget(); |
| 3942 | int h=c->height(); |
| 3943 | int toph=h-maph; |
| 3944 | int iuw=3*qt_settings->glyphs().width(); |
| 3945 | int topw=(c->width()-iuw)/2; |
| 3946 | |
| 3947 | message->Widget()->setGeometry(0,0,topw,toph); |
| 3948 | invusage->setGeometry(topw,0,iuw,toph); |
| 3949 | status->Widget()->setGeometry(topw+iuw,0,topw,toph); |
| 3950 | map->Widget()->setGeometry(QMAX(0,(c->width()-maxs.width())/2), |
| 3951 | toph,c->width(),maph); |
| 3952 | } |
| 3953 | } |
| 3954 | |
| 3955 | void NetHackQtMainWindow::resizeEvent(QResizeEvent*) |
| 3956 | { |