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

Function centerOnMain

win/Qt/qt_win.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76namespace nethack_qt_ {
77
78void
79centerOnMain(QWidget *w)
80{
81 QPoint p(0, 0);
82 QWidget *m = NetHackQtBind::mainWidget();
83 if (m)
84 p = m->mapToGlobal(p);
85 w->move(p.x() + m->width() / 2 - w->width() / 2,
86 p.y() + m->height() / 2 - w->height() / 2);
87}
88
89NetHackQtWindow::NetHackQtWindow()
90{

Callers 7

getMethod · 0.70
ChooseMethod · 0.70
ExecMethod · 0.70
GetMethod · 0.70
doQtSettingsMethod · 0.70
SelectMenuMethod · 0.70
DisplayMethod · 0.70

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected