Qt: show main window normally instead of maximized
Sidenote: The main window size calculations are getting stupid. It would be better to find out the widget sizes and shift the splitter up, instead of letting it just take up half of the main window. Idea and part of the code by Richard Henschel
This commit is contained in:
@@ -2118,6 +2118,7 @@ Qt: with a pick-one menu containing a pre-selected entry, clicking on that
|
||||
instead of typing the selector letter toggled off preselected entry
|
||||
but failed to toggle on the explicitly selected one; clicking again
|
||||
after nothing was pre-selected anymore refused to toggle anything on
|
||||
Qt: don't show main window and tombstone window maximized by default
|
||||
tty: redraw unexplored locations as S_unexplored rather than <space> after
|
||||
map has been partially overwritten by popup menu or text display
|
||||
tty: previous change resulted in remnants of previous level being shown on
|
||||
|
||||
@@ -886,8 +886,8 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
if (qt_settings != NULL) {
|
||||
auto glyphs = &qt_settings->glyphs();
|
||||
if (glyphs != NULL) {
|
||||
maxwn = glyphs->width() * COLNO + 10;
|
||||
maxhn = glyphs->height() * ROWNO * 6/4;
|
||||
maxwn = glyphs->width() * (COLNO + 1);
|
||||
maxhn = glyphs->height() * ROWNO * 6/4 + glyphs->height() * 10;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1456,7 +1456,7 @@ void NetHackQtMainWindow::ShowIfReady()
|
||||
} else {
|
||||
layout();
|
||||
}
|
||||
showMaximized();
|
||||
showNormal();
|
||||
} else if (isVisible()) {
|
||||
hide();
|
||||
}
|
||||
|
||||
@@ -1115,8 +1115,7 @@ void NetHackQtTextWindow::Display(bool block UNUSED)
|
||||
#endif
|
||||
int mh = screensize.height()*3/5;
|
||||
if ( (qt_compact_mode && lines->TotalHeight() > mh) || use_rip ) {
|
||||
// big, so make it fill
|
||||
showMaximized();
|
||||
showNormal();
|
||||
} else {
|
||||
move(0, 0);
|
||||
adjustSize();
|
||||
|
||||
Reference in New Issue
Block a user