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

Method sizeHint

win/Qt/qt_icon.cpp:154–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154QSize NetHackQtLabelledIcon::sizeHint() const
155{
156 QSize iconsize, textsize;
157
158 if (label && !icon) return label->sizeHint();
159 if (icon && !label) return icon->sizeHint();
160 if (!label && !icon) return QWidget::sizeHint();
161
162 iconsize = icon->sizeHint();
163 textsize = label->sizeHint();
164 return QSize(
165 std::max(iconsize.width(), textsize.width()),
166 iconsize.height() + textsize.height());
167}
168
169QSize NetHackQtLabelledIcon::minimumSizeHint() const
170{

Callers

nothing calls this directly

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected