CustomFrame: Move the features enum up 1 level
This commit is contained in:
@@ -605,8 +605,8 @@ bool CustomFrameHelper::nativeEventFilter(const QByteArray &eventType, void *mes
|
||||
if (!window)
|
||||
return false;
|
||||
|
||||
const Features features = m_shouldUseCustomFrameFunc(window);
|
||||
if (features == Feature_None) {
|
||||
const WidgetResizeHandler::Features features = m_shouldUseCustomFrameFunc(window);
|
||||
if (!features) {
|
||||
// No native support for is desired for this window
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -31,11 +31,21 @@ namespace KDDockWidgets {
|
||||
|
||||
class FloatingWindow;
|
||||
|
||||
|
||||
class DOCKS_EXPORT WidgetResizeHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
enum Feature {
|
||||
Feature_None = 0,
|
||||
Feature_NativeShadow = 1,
|
||||
Feature_NativeResize = 2,
|
||||
Feature_NativeDrag = 4,
|
||||
Feature_NativeMaximize = 8
|
||||
};
|
||||
Q_DECLARE_FLAGS(Features, Feature);
|
||||
|
||||
/**
|
||||
* @brief CTOR
|
||||
* @param isTopLevelResizer If true, then this resize handler is for top-level widgets (aka windows)
|
||||
@@ -130,17 +140,7 @@ class DOCKS_EXPORT CustomFrameHelper
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
enum Feature {
|
||||
Feature_None = 0,
|
||||
Feature_NativeShadow = 1,
|
||||
Feature_NativeResize = 2,
|
||||
Feature_NativeDrag = 4,
|
||||
Feature_NativeMaximize = 8
|
||||
};
|
||||
Q_DECLARE_FLAGS(Features, Feature);
|
||||
typedef Features (*ShouldUseCustomFrame)(QWindow *);
|
||||
|
||||
typedef WidgetResizeHandler::Features (*ShouldUseCustomFrame)(QWindow *);
|
||||
explicit CustomFrameHelper(ShouldUseCustomFrame shouldUseCustomFrameFunc,
|
||||
QObject *parent = nullptr);
|
||||
~CustomFrameHelper() override;
|
||||
|
||||
Reference in New Issue
Block a user