MCPcopy Create free account
hub / github.com/KDAB/GammaRay / fitToView

Method fitToView

ui/remoteviewwidget.cpp:492–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492void RemoteViewWidget::fitToView()
493{
494 const auto scale =
495 std::min<double>(1.0,
496 std::min(( double )contentWidth() / ( double )m_frame.sceneRect().width(),
497 ( double )contentHeight() / ( double )m_frame.sceneRect().height()));
498 setZoom(scale);
499 centerView();
500}
501
502void RemoteViewWidget::centerView()
503{

Callers

nothing calls this directly

Calls 1

sceneRectMethod · 0.80

Tested by

no test coverage detected