MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / SetWindowResizeable

Function SetWindowResizeable

pcsx2-qt/QtUtils.cpp:342–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340 }
341
342 void SetWindowResizeable(QWidget* widget, bool resizeable)
343 {
344 if (QMainWindow* window = qobject_cast<QMainWindow*>(widget); window)
345 {
346 // update status bar grip if present
347 if (QStatusBar* sb = window->statusBar(); sb)
348 sb->setSizeGripEnabled(resizeable);
349 }
350
351 if ((widget->sizePolicy().horizontalPolicy() == QSizePolicy::Preferred) != resizeable)
352 {
353 if (resizeable)
354 {
355 // Min/max numbers come from uic.
356 widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
357 widget->setMinimumSize(1, 1);
358 widget->setMaximumSize(16777215, 16777215);
359 }
360 else
361 {
362 widget->setFixedSize(widget->size());
363 widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
364 }
365 }
366 }
367
368 void SetWindowResizeable(QWindow* window, bool resizeable)
369 {

Callers 1

updateWindowStateMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected