Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/widgets/kis_paintop_presets_popup.cpp
Context not available. | |||||
32 | #include <QShowEvent> | 32 | #include <QShowEvent> | ||
---|---|---|---|---|---|
33 | #include <QFontDatabase> | 33 | #include <QFontDatabase> | ||
34 | #include <QWidgetAction> | 34 | #include <QWidgetAction> | ||
35 | #include <QDesktopWidget> | ||||
35 | 36 | | |||
36 | #include <kconfig.h> | 37 | #include <kconfig.h> | ||
37 | #include <klocalizedstring.h> | 38 | #include <klocalizedstring.h> | ||
Context not available. | |||||
61 | #include <brushengine/kis_paintop_factory.h> | 62 | #include <brushengine/kis_paintop_factory.h> | ||
62 | #include <kis_preset_live_preview_view.h> | 63 | #include <kis_preset_live_preview_view.h> | ||
63 | 64 | | |||
65 | class KisPopupButton; | ||||
64 | 66 | | |||
65 | struct KisPaintOpPresetsPopup::Private | 67 | struct KisPaintOpPresetsPopup::Private | ||
66 | { | 68 | { | ||
Context not available. | |||||
73 | QFont smallFont; | 75 | QFont smallFont; | ||
74 | KisCanvasResourceProvider *resourceProvider; | 76 | KisCanvasResourceProvider *resourceProvider; | ||
75 | KisFavoriteResourceManager *favoriteResManager; | 77 | KisFavoriteResourceManager *favoriteResManager; | ||
78 | KisPopupButton *popupButton; // button that invokes this popup | ||||
76 | 79 | | |||
77 | bool detached; | 80 | bool detached; | ||
78 | bool ignoreHideEvents; | 81 | bool ignoreHideEvents; | ||
Context not available. | |||||
673 | void KisPaintOpPresetsPopup::resizeEvent(QResizeEvent* event) | 676 | void KisPaintOpPresetsPopup::resizeEvent(QResizeEvent* event) | ||
674 | { | 677 | { | ||
675 | QWidget::resizeEvent(event); | 678 | QWidget::resizeEvent(event); | ||
676 | emit sizeChanged(); | 679 | // Make sure resizing doesn't push this widget out of the screen | ||
680 | QRect screenRect = QApplication::desktop()->availableGeometry(this); | ||||
681 | QRect newPositionRect = kisEnsureInRect(parentWidget()->geometry(), screenRect); | ||||
682 | parentWidget()->setGeometry(newPositionRect); | ||||
677 | } | 683 | } | ||
678 | 684 | | |||
679 | bool KisPaintOpPresetsPopup::detached() const | 685 | bool KisPaintOpPresetsPopup::detached() const | ||
Context not available. |