MCPcopy Create free account
hub / github.com/KDE/labplot / setFixedMode

Method setFixedMode

src/frontend/widgets/ThemesWidget.cpp:116–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114// }
115
116void ThemesWidget::setFixedMode() {
117 // resize the widget to show three items only
118 int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
119 QFont font;
120 QFontMetrics fm(font);
121 static const int themeIconSize = std::ceil(3.0 / GSL_CONST_CGS_INCH * QApplication::primaryScreen()->physicalDotsPerInchX());
122 QSize widgetSize(themeIconSize + style()->pixelMetric(QStyle::PM_ScrollBarExtent) + frameWidth * 2,
123 3 * (themeIconSize + fm.height() + 2 * frameWidth) + fm.height() + frameWidth);
124 setMinimumSize(widgetSize);
125 setMaximumSize(widgetSize);
126}

Callers 3

showPanelMethod · 0.80
initMenusMethod · 0.80
initMenusMethod · 0.80

Calls 1

heightMethod · 0.80

Tested by

no test coverage detected