| 96 | |
| 97 | |
| 98 | void 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 | |
| 108 | void Toast::startTimer(int timeout) |
no test coverage detected