Qt font selection dropdown menu

In "Qt settings" (or "Preferences" for OSX), the current font size
would show "Medium" if that was the current setting.  So far, so
good.  However, if you clicked on the up/down arrows to get the
dropdown menu, it was truncated to "Mediu" there regardless of
current setting.  Force the menu to be wide enough to show "Medium".
This commit is contained in:
PatR
2020-11-23 17:39:00 -08:00
parent 479bb87766
commit 0c56c06316

View File

@@ -141,6 +141,7 @@ NetHackQtSettings::NetHackQtSettings() :
connect(&dollheight, SIGNAL(valueChanged(int)), this, SLOT(resizeDoll()));
#endif
fontsize.setMinimumContentsLength((int) strlen("Medium"));
fontsize.addItem("Huge");
fontsize.addItem("Large");
fontsize.addItem("Medium");