PDFDocumentMagnifierView ========================
| 1648 | // ======================== |
| 1649 | // |
| 1650 | PDFDocumentMagnifierView::PDFDocumentMagnifierView(PDFDocumentView *parent /* = nullptr */) : |
| 1651 | Super(parent != nullptr ? parent->viewport() : nullptr), |
| 1652 | _parent_view(parent) |
| 1653 | { |
| 1654 | // the magnifier should initially be hidden |
| 1655 | hide(); |
| 1656 | |
| 1657 | // suppress scrollbars |
| 1658 | setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
| 1659 | setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
| 1660 | // suppress any border styling (which doesn't work with a mask, e.g., for a |
| 1661 | // circular magnifier) |
| 1662 | setFrameShape(QFrame::NoFrame); |
| 1663 | |
| 1664 | if (parent) { |
| 1665 | // transfer some settings from the parent view |
| 1666 | setBackgroundRole(parent->backgroundRole()); |
| 1667 | setAlignment(parent->alignment()); |
| 1668 | } |
| 1669 | |
| 1670 | setShape(_shape); |
| 1671 | } |
| 1672 | |
| 1673 | void PDFDocumentMagnifierView::prepareToShow() |
| 1674 | { |