MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / adjustPosition

Method adjustPosition

src/gui/widgets/toast.cpp:98–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96
97
98void Toast::adjustPosition(const QRect& region)
99{
100 QStyleOption style_option;
101 auto const margin = style()->pixelMetric(QStyle::PM_LayoutBottomMargin, &style_option);
102 auto const x = region.left() + (region.width() - width()) / 2;
103 auto const y = region.bottom() - height() - margin;
104 move(x, y);
105}
106
107
108void Toast::startTimer(int timeout)

Callers 1

eventMethod · 0.45

Calls 2

pixelMetricMethod · 0.80
widthMethod · 0.45

Tested by

no test coverage detected