MCPcopy Create free account
hub / github.com/NetHack/NetHack / layout

Method layout

outdated/win/Qt3/qt3_win.cpp:3933–3953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3931}
3932
3933void 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
3955void NetHackQtMainWindow::resizeEvent(QResizeEvent*)
3956{

Callers

nothing calls this directly

Calls 3

WidgetMethod · 0.45
heightMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected