Qt screen layout
Simplify a recent change to the screen layout. Qt can calculate the details and the recent code resulted in a slight amount of blank space between the paperdoll and its resize hotspot. Fix an off-by-one bug in the paperdoll resize routine. (The one pixel margin at the top was being overlooked.)
This commit is contained in:
+4
-4
@@ -222,13 +222,13 @@ QSize NetHackQtInvUsageWindow::sizeHint(void) const
|
||||
if (iflags.wc_ascii_map)
|
||||
qt_settings->doll_is_shown = false;
|
||||
if (qt_settings->doll_is_shown) {
|
||||
w = (1 + qt_settings->dollWidth + 1) * 3;
|
||||
h = (1 + qt_settings->dollHeight + 1) * 6;
|
||||
w += (1 + qt_settings->dollWidth + 1) * 3;
|
||||
h += (1 + qt_settings->dollHeight + 1) * 6;
|
||||
}
|
||||
#else
|
||||
if (iflags.wc_tiled_map) {
|
||||
w = (1 + qt_settings->glyphs().width() + 1) * 3;
|
||||
h = (1 + qt_settings->glyphs().height() + 1) * 6;
|
||||
w += (1 + qt_settings->glyphs().width() + 1) * 3;
|
||||
h += (1 + qt_settings->glyphs().height() + 1) * 6;
|
||||
}
|
||||
#endif
|
||||
return QSize(w, h);
|
||||
|
||||
Reference in New Issue
Block a user