Compare commits
No commits in common. "85a3fe1b2f718ff94f83833241c202ee9ef9908a" and "79a9327c01e55f0a44812b6c09bd21e977d028ec" have entirely different histories.
85a3fe1b2f
...
79a9327c01
|
@ -221,20 +221,6 @@ add_project_config(KEY "system_button" CONDITION NOT FRAMELESSHELPER_NO_SYSTEM_B
|
||||||
add_project_config(KEY "native_impl" CONDITION FRAMELESSHELPER_NATIVE_IMPL)
|
add_project_config(KEY "native_impl" CONDITION FRAMELESSHELPER_NATIVE_IMPL)
|
||||||
generate_project_config(PATH "${FRAMELESSHELPER_CONFIG_FILE}")
|
generate_project_config(PATH "${FRAMELESSHELPER_CONFIG_FILE}")
|
||||||
|
|
||||||
function(setup_custom_moc_macros)
|
|
||||||
cmake_parse_arguments(arg "" "" "TARGETS" ${ARGN})
|
|
||||||
if(arg_UNPARSED_ARGUMENTS)
|
|
||||||
message(AUTHOR_WARNING "setup_custom_moc_macros: Unrecognized arguments: ${arg_UNPARSED_ARGUMENTS}")
|
|
||||||
endif()
|
|
||||||
foreach(__target ${arg_TARGETS})
|
|
||||||
if(NOT TARGET ${__target})
|
|
||||||
message(AUTHOR_WARNING "${__target} is not a valid CMake target!")
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
set_property(TARGET ${__target} APPEND PROPERTY AUTOMOC_MACRO_NAMES "FRAMELESSHELPER_QT_CLASS;FRAMELESSHELPER_PUBLIC_QT_CLASS;FRAMELESSHELPER_PRIVATE_QT_CLASS")
|
|
||||||
endforeach()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if(FRAMELESSHELPER_BUILD_WIDGETS OR FRAMELESSHELPER_BUILD_QUICK)
|
if(FRAMELESSHELPER_BUILD_WIDGETS OR FRAMELESSHELPER_BUILD_QUICK)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -35,7 +35,7 @@ FramelessApplicationWindow {
|
||||||
height: 600
|
height: 600
|
||||||
title: qsTr("FramelessHelper demo application - Qt Quick [") + objectName + ']'
|
title: qsTr("FramelessHelper demo application - Qt Quick [") + objectName + ']'
|
||||||
color: {
|
color: {
|
||||||
if (FramelessHelper.blurBehindWindowEnabled && FramelessUtils.blurBehindWindowSupported) {
|
if (FramelessHelper.blurBehindWindowEnabled) {
|
||||||
return "transparent";
|
return "transparent";
|
||||||
}
|
}
|
||||||
if (FramelessUtils.systemTheme === FramelessHelperConstants.Dark) {
|
if (FramelessUtils.systemTheme === FramelessHelperConstants.Dark) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ FramelessWindow {
|
||||||
height: 600
|
height: 600
|
||||||
title: qsTr("FramelessHelper demo application - Qt Quick [") + objectName +']'
|
title: qsTr("FramelessHelper demo application - Qt Quick [") + objectName +']'
|
||||||
color: {
|
color: {
|
||||||
if (FramelessHelper.blurBehindWindowEnabled && FramelessUtils.blurBehindWindowSupported) {
|
if (FramelessHelper.blurBehindWindowEnabled) {
|
||||||
return "transparent";
|
return "transparent";
|
||||||
}
|
}
|
||||||
if (FramelessUtils.systemTheme === FramelessHelperConstants.Dark) {
|
if (FramelessUtils.systemTheme === FramelessHelperConstants.Dark) {
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <QtWidgets/qboxlayout.h>
|
#include <QtWidgets/qboxlayout.h>
|
||||||
#include <QtWidgets/qfileiconprovider.h>
|
#include <QtWidgets/qfileiconprovider.h>
|
||||||
#include <FramelessHelper/Core/framelessmanager.h>
|
#include <FramelessHelper/Core/framelessmanager.h>
|
||||||
#include <FramelessHelper/Core/utils.h>
|
|
||||||
#include <FramelessHelper/Widgets/framelesswidgetshelper.h>
|
#include <FramelessHelper/Widgets/framelesswidgetshelper.h>
|
||||||
#include <FramelessHelper/Widgets/standardtitlebar.h>
|
#include <FramelessHelper/Widgets/standardtitlebar.h>
|
||||||
#include <FramelessHelper/Widgets/standardsystembutton.h>
|
#include <FramelessHelper/Widgets/standardsystembutton.h>
|
||||||
|
@ -188,7 +187,7 @@ void Widget::updateStyleSheet()
|
||||||
m_clockLabel->setStyleSheet(labelStyleSheet);
|
m_clockLabel->setStyleSheet(labelStyleSheet);
|
||||||
m_compilerInfoLabel->setStyleSheet(labelStyleSheet);
|
m_compilerInfoLabel->setStyleSheet(labelStyleSheet);
|
||||||
m_commitInfoLabel->setStyleSheet(labelStyleSheet);
|
m_commitInfoLabel->setStyleSheet(labelStyleSheet);
|
||||||
if (FramelessWidgetsHelper::get(this)->isBlurBehindWindowEnabled() && Utils::isBlurBehindWindowSupported()) {
|
if (FramelessWidgetsHelper::get(this)->isBlurBehindWindowEnabled()) {
|
||||||
setStyleSheet(FRAMELESSHELPER_STRING_LITERAL("background-color: transparent;"));
|
setStyleSheet(FRAMELESSHELPER_STRING_LITERAL("background-color: transparent;"));
|
||||||
} else {
|
} else {
|
||||||
const QColor windowBackgroundColor = (dark ? kDefaultSystemDarkColor : kDefaultSystemLightColor);
|
const QColor windowBackgroundColor = (dark ? kDefaultSystemDarkColor : kDefaultSystemLightColor);
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class ChromePalettePrivate;
|
class ChromePalettePrivate;
|
||||||
class FRAMELESSHELPER_CORE_API ChromePalette : public QObject
|
class FRAMELESSHELPER_CORE_API ChromePalette : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(ChromePalette)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(ChromePalette)
|
||||||
|
|
||||||
Q_PROPERTY(QColor titleBarActiveBackgroundColor READ titleBarActiveBackgroundColor
|
Q_PROPERTY(QColor titleBarActiveBackgroundColor READ titleBarActiveBackgroundColor
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessHelperQtPrivate;
|
class FramelessHelperQtPrivate;
|
||||||
class FRAMELESSHELPER_CORE_API FramelessHelperQt : public QObject
|
class FRAMELESSHELPER_CORE_API FramelessHelperQt : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessHelperQt)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessHelperQt)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -316,7 +316,6 @@ QT_END_NAMESPACE
|
||||||
#ifndef FRAMELESSHELPER_QT_CLASS
|
#ifndef FRAMELESSHELPER_QT_CLASS
|
||||||
# define FRAMELESSHELPER_QT_CLASS(Class) \
|
# define FRAMELESSHELPER_QT_CLASS(Class) \
|
||||||
private: \
|
private: \
|
||||||
Q_OBJECT \
|
|
||||||
FRAMELESSHELPER_CLASS_INFO \
|
FRAMELESSHELPER_CLASS_INFO \
|
||||||
FRAMELESSHELPER_CLASS(Class)
|
FRAMELESSHELPER_CLASS(Class)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,6 +32,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessManagerPrivate;
|
class FramelessManagerPrivate;
|
||||||
class FRAMELESSHELPER_CORE_API FramelessManager : public QObject
|
class FRAMELESSHELPER_CORE_API FramelessManager : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessManager)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessManager)
|
||||||
Q_PROPERTY(Global::SystemTheme systemTheme READ systemTheme WRITE setOverrideTheme NOTIFY systemThemeChanged FINAL)
|
Q_PROPERTY(Global::SystemTheme systemTheme READ systemTheme WRITE setOverrideTheme NOTIFY systemThemeChanged FINAL)
|
||||||
Q_PROPERTY(QColor systemAccentColor READ systemAccentColor NOTIFY systemThemeChanged FINAL)
|
Q_PROPERTY(QColor systemAccentColor READ systemAccentColor NOTIFY systemThemeChanged FINAL)
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class MicaMaterialPrivate;
|
class MicaMaterialPrivate;
|
||||||
class FRAMELESSHELPER_CORE_API MicaMaterial : public QObject
|
class FRAMELESSHELPER_CORE_API MicaMaterial : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(MicaMaterial)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(MicaMaterial)
|
||||||
|
|
||||||
Q_PROPERTY(QColor tintColor READ tintColor WRITE setTintColor NOTIFY tintColorChanged FINAL)
|
Q_PROPERTY(QColor tintColor READ tintColor WRITE setTintColor NOTIFY tintColorChanged FINAL)
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class ChromePalette;
|
class ChromePalette;
|
||||||
class FRAMELESSHELPER_CORE_API ChromePalettePrivate : public QObject
|
class FRAMELESSHELPER_CORE_API ChromePalettePrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(ChromePalette)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(ChromePalette)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -30,6 +30,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_CORE_API FramelessConfig : public QObject
|
class FRAMELESSHELPER_CORE_API FramelessConfig : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(FramelessConfig)
|
FRAMELESSHELPER_QT_CLASS(FramelessConfig)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -36,6 +36,7 @@ using FramelessDataPtr = std::shared_ptr<FramelessData>;
|
||||||
class FramelessManager;
|
class FramelessManager;
|
||||||
class FRAMELESSHELPER_CORE_API FramelessManagerPrivate : public QObject
|
class FRAMELESSHELPER_CORE_API FramelessManagerPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessManager)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessManager)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class MicaMaterial;
|
class MicaMaterial;
|
||||||
class FRAMELESSHELPER_CORE_API MicaMaterialPrivate : public QObject
|
class FRAMELESSHELPER_CORE_API MicaMaterialPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(MicaMaterial)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(MicaMaterial)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -60,6 +60,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_CORE_API RegistryKey : public QObject
|
class FRAMELESSHELPER_CORE_API RegistryKey : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(RegistryKey)
|
FRAMELESSHELPER_QT_CLASS(RegistryKey)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -30,6 +30,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_CORE_API SysApiLoader : public QObject
|
class FRAMELESSHELPER_CORE_API SysApiLoader : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(SysApiLoader)
|
FRAMELESSHELPER_QT_CLASS(SysApiLoader)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class WindowBorderPainter;
|
class WindowBorderPainter;
|
||||||
class FRAMELESSHELPER_CORE_API WindowBorderPainterPrivate : public QObject
|
class FRAMELESSHELPER_CORE_API WindowBorderPainterPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(WindowBorderPainter)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(WindowBorderPainter)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class WindowBorderPainterPrivate;
|
class WindowBorderPainterPrivate;
|
||||||
class FRAMELESSHELPER_CORE_API WindowBorderPainter : public QObject
|
class FRAMELESSHELPER_CORE_API WindowBorderPainter : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(WindowBorderPainter)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(WindowBorderPainter)
|
||||||
|
|
||||||
Q_PROPERTY(int thickness READ thickness WRITE setThickness NOTIFY thicknessChanged FINAL)
|
Q_PROPERTY(int thickness READ thickness WRITE setThickness NOTIFY thicknessChanged FINAL)
|
||||||
|
|
|
@ -87,6 +87,7 @@ FRAMELESSHELPER_QUICK_API void FramelessHelperQuickRegisterTypes(QQmlEngine *);
|
||||||
|
|
||||||
class FRAMELESSHELPER_QUICK_API QuickGlobal : public QObject
|
class FRAMELESSHELPER_QUICK_API QuickGlobal : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(QuickGlobal)
|
FRAMELESSHELPER_QT_CLASS(QuickGlobal)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(FramelessHelperConstants)
|
QML_NAMED_ELEMENT(FramelessHelperConstants)
|
||||||
|
|
|
@ -41,6 +41,7 @@ class QuickWindowBorder;
|
||||||
class FramelessQuickHelperPrivate;
|
class FramelessQuickHelperPrivate;
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickHelper : public QQuickItem
|
class FRAMELESSHELPER_QUICK_API FramelessQuickHelper : public QQuickItem
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessQuickHelper)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessQuickHelper)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(FramelessHelper)
|
QML_NAMED_ELEMENT(FramelessHelper)
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickUtils : public QObject, public QQmlParserStatus
|
class FRAMELESSHELPER_QUICK_API FramelessQuickUtils : public QObject, public QQmlParserStatus
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(FramelessQuickUtils)
|
FRAMELESSHELPER_QT_CLASS(FramelessQuickUtils)
|
||||||
Q_INTERFACES(QQmlParserStatus)
|
Q_INTERFACES(QQmlParserStatus)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
|
|
|
@ -36,6 +36,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessQuickApplicationWindowPrivate;
|
class FramelessQuickApplicationWindowPrivate;
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickApplicationWindow : public QQuickApplicationWindow
|
class FRAMELESSHELPER_QUICK_API FramelessQuickApplicationWindow : public QQuickApplicationWindow
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessQuickApplicationWindow)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessQuickApplicationWindow)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(FramelessApplicationWindow)
|
QML_NAMED_ELEMENT(FramelessApplicationWindow)
|
||||||
|
|
|
@ -39,6 +39,7 @@ class QuickWindowBorder;
|
||||||
class FramelessQuickApplicationWindow;
|
class FramelessQuickApplicationWindow;
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickApplicationWindowPrivate : public QObject
|
class FRAMELESSHELPER_QUICK_API FramelessQuickApplicationWindowPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessQuickApplicationWindow)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessQuickApplicationWindow)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -44,6 +44,7 @@ class QuickWindowBorder;
|
||||||
class FramelessQuickHelper;
|
class FramelessQuickHelper;
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickHelperPrivate : public QObject
|
class FRAMELESSHELPER_QUICK_API FramelessQuickHelperPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessQuickHelper)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessQuickHelper)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -36,6 +36,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessQuickWindowPrivate;
|
class FramelessQuickWindowPrivate;
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickWindow : public QQuickWindowQmlImpl
|
class FRAMELESSHELPER_QUICK_API FramelessQuickWindow : public QQuickWindowQmlImpl
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessQuickWindow)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessQuickWindow)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(FramelessWindow)
|
QML_NAMED_ELEMENT(FramelessWindow)
|
||||||
|
|
|
@ -39,6 +39,7 @@ class QuickWindowBorder;
|
||||||
class FramelessQuickWindow;
|
class FramelessQuickWindow;
|
||||||
class FRAMELESSHELPER_QUICK_API FramelessQuickWindowPrivate : public QObject
|
class FRAMELESSHELPER_QUICK_API FramelessQuickWindowPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessQuickWindow)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessQuickWindow)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -32,6 +32,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_QUICK_API QuickImageItem : public QQuickPaintedItem
|
class FRAMELESSHELPER_QUICK_API QuickImageItem : public QQuickPaintedItem
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(QuickImageItem)
|
FRAMELESSHELPER_QT_CLASS(QuickImageItem)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(ImageItem)
|
QML_NAMED_ELEMENT(ImageItem)
|
||||||
|
|
|
@ -35,6 +35,7 @@ class MicaMaterial;
|
||||||
class QuickMicaMaterial;
|
class QuickMicaMaterial;
|
||||||
class FRAMELESSHELPER_QUICK_API QuickMicaMaterialPrivate : public QObject
|
class FRAMELESSHELPER_QUICK_API QuickMicaMaterialPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(QuickMicaMaterial)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(QuickMicaMaterial)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -39,6 +39,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_QUICK_API QuickStandardSystemButton : public QQuickButton
|
class FRAMELESSHELPER_QUICK_API QuickStandardSystemButton : public QQuickButton
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(QuickStandardSystemButton)
|
FRAMELESSHELPER_QT_CLASS(QuickStandardSystemButton)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(StandardSystemButton)
|
QML_NAMED_ELEMENT(StandardSystemButton)
|
||||||
|
|
|
@ -45,6 +45,7 @@ class QuickImageItem;
|
||||||
|
|
||||||
class FRAMELESSHELPER_QUICK_API QuickStandardTitleBar : public QQuickRectangle
|
class FRAMELESSHELPER_QUICK_API QuickStandardTitleBar : public QQuickRectangle
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(QuickStandardTitleBar)
|
FRAMELESSHELPER_QT_CLASS(QuickStandardTitleBar)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(StandardTitleBar)
|
QML_NAMED_ELEMENT(StandardTitleBar)
|
||||||
|
|
|
@ -35,6 +35,7 @@ class WindowBorderPainter;
|
||||||
class QuickWindowBorder;
|
class QuickWindowBorder;
|
||||||
class FRAMELESSHELPER_QUICK_API QuickWindowBorderPrivate : public QObject
|
class FRAMELESSHELPER_QUICK_API QuickWindowBorderPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(QuickWindowBorder)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(QuickWindowBorder)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_QUICK_API QuickChromePalette : public ChromePalette, public QQmlParserStatus
|
class FRAMELESSHELPER_QUICK_API QuickChromePalette : public ChromePalette, public QQmlParserStatus
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(QuickChromePalette)
|
FRAMELESSHELPER_QT_CLASS(QuickChromePalette)
|
||||||
Q_INTERFACES(QQmlParserStatus)
|
Q_INTERFACES(QQmlParserStatus)
|
||||||
#ifdef QML_ANONYMOUS
|
#ifdef QML_ANONYMOUS
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class QuickMicaMaterialPrivate;
|
class QuickMicaMaterialPrivate;
|
||||||
class FRAMELESSHELPER_QUICK_API QuickMicaMaterial : public QQuickPaintedItem
|
class FRAMELESSHELPER_QUICK_API QuickMicaMaterial : public QQuickPaintedItem
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(QuickMicaMaterial)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(QuickMicaMaterial)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(MicaMaterial)
|
QML_NAMED_ELEMENT(MicaMaterial)
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class QuickWindowBorderPrivate;
|
class QuickWindowBorderPrivate;
|
||||||
class FRAMELESSHELPER_QUICK_API QuickWindowBorder : public QQuickPaintedItem
|
class FRAMELESSHELPER_QUICK_API QuickWindowBorder : public QQuickPaintedItem
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(QuickWindowBorder)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(QuickWindowBorder)
|
||||||
#ifdef QML_NAMED_ELEMENT
|
#ifdef QML_NAMED_ELEMENT
|
||||||
QML_NAMED_ELEMENT(WindowBorder)
|
QML_NAMED_ELEMENT(WindowBorder)
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessDialogPrivate;
|
class FramelessDialogPrivate;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessDialog : public QDialog
|
class FRAMELESSHELPER_WIDGETS_API FramelessDialog : public QDialog
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessDialog)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessMainWindowPrivate;
|
class FramelessMainWindowPrivate;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessMainWindow : public QMainWindow
|
class FRAMELESSHELPER_WIDGETS_API FramelessMainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessMainWindow)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessMainWindow)
|
||||||
Q_PROPERTY(bool hidden READ isHidden NOTIFY hiddenChanged FINAL)
|
Q_PROPERTY(bool hidden READ isHidden NOTIFY hiddenChanged FINAL)
|
||||||
Q_PROPERTY(bool normal READ isNormal NOTIFY normalChanged FINAL)
|
Q_PROPERTY(bool normal READ isNormal NOTIFY normalChanged FINAL)
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class FramelessWidgetPrivate;
|
class FramelessWidgetPrivate;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessWidget : public QWidget
|
class FRAMELESSHELPER_WIDGETS_API FramelessWidget : public QWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessWidget)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessWidget)
|
||||||
Q_PROPERTY(bool hidden READ isHidden NOTIFY hiddenChanged FINAL)
|
Q_PROPERTY(bool hidden READ isHidden NOTIFY hiddenChanged FINAL)
|
||||||
Q_PROPERTY(bool normal READ isNormal NOTIFY normalChanged FINAL)
|
Q_PROPERTY(bool normal READ isNormal NOTIFY normalChanged FINAL)
|
||||||
|
|
|
@ -40,6 +40,7 @@ class WindowBorderPainter;
|
||||||
class FramelessWidgetsHelperPrivate;
|
class FramelessWidgetsHelperPrivate;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessWidgetsHelper : public QObject
|
class FRAMELESSHELPER_WIDGETS_API FramelessWidgetsHelper : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessWidgetsHelper)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(FramelessWidgetsHelper)
|
||||||
Q_PROPERTY(QWidget* titleBarWidget READ titleBarWidget WRITE setTitleBarWidget NOTIFY titleBarWidgetChanged FINAL)
|
Q_PROPERTY(QWidget* titleBarWidget READ titleBarWidget WRITE setTitleBarWidget NOTIFY titleBarWidgetChanged FINAL)
|
||||||
Q_PROPERTY(bool windowFixedSize READ isWindowFixedSize WRITE setWindowFixedSize NOTIFY windowFixedSizeChanged FINAL)
|
Q_PROPERTY(bool windowFixedSize READ isWindowFixedSize WRITE setWindowFixedSize NOTIFY windowFixedSizeChanged FINAL)
|
||||||
|
|
|
@ -35,6 +35,7 @@ class WidgetsSharedHelper;
|
||||||
class FramelessDialog;
|
class FramelessDialog;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessDialogPrivate : public QObject
|
class FRAMELESSHELPER_WIDGETS_API FramelessDialogPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessDialog)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -35,6 +35,7 @@ class WidgetsSharedHelper;
|
||||||
class FramelessMainWindow;
|
class FramelessMainWindow;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessMainWindowPrivate : public QObject
|
class FRAMELESSHELPER_WIDGETS_API FramelessMainWindowPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessMainWindow)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessMainWindow)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -35,6 +35,7 @@ class WidgetsSharedHelper;
|
||||||
class FramelessWidget;
|
class FramelessWidget;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessWidgetPrivate : public QObject
|
class FRAMELESSHELPER_WIDGETS_API FramelessWidgetPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessWidget)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -42,6 +42,7 @@ class WidgetsSharedHelper;
|
||||||
class FramelessWidgetsHelper;
|
class FramelessWidgetsHelper;
|
||||||
class FRAMELESSHELPER_WIDGETS_API FramelessWidgetsHelperPrivate : public QObject
|
class FRAMELESSHELPER_WIDGETS_API FramelessWidgetsHelperPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessWidgetsHelper)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(FramelessWidgetsHelper)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,6 +34,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class StandardSystemButton;
|
class StandardSystemButton;
|
||||||
class FRAMELESSHELPER_WIDGETS_API StandardSystemButtonPrivate : public QObject
|
class FRAMELESSHELPER_WIDGETS_API StandardSystemButtonPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(StandardSystemButton)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(StandardSystemButton)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -44,6 +44,7 @@ class ChromePalette;
|
||||||
class StandardTitleBar;
|
class StandardTitleBar;
|
||||||
class FRAMELESSHELPER_WIDGETS_API StandardTitleBarPrivate : public QObject
|
class FRAMELESSHELPER_WIDGETS_API StandardTitleBarPrivate : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PRIVATE_QT_CLASS(StandardTitleBar)
|
FRAMELESSHELPER_PRIVATE_QT_CLASS(StandardTitleBar)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -38,6 +38,7 @@ class WindowBorderPainter;
|
||||||
|
|
||||||
class FRAMELESSHELPER_WIDGETS_API WidgetsSharedHelper : public QObject
|
class FRAMELESSHELPER_WIDGETS_API WidgetsSharedHelper : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(WidgetsSharedHelper)
|
FRAMELESSHELPER_QT_CLASS(WidgetsSharedHelper)
|
||||||
#if FRAMELESSHELPER_CONFIG(mica_material)
|
#if FRAMELESSHELPER_CONFIG(mica_material)
|
||||||
Q_PROPERTY(bool micaEnabled READ isMicaEnabled WRITE setMicaEnabled NOTIFY micaEnabledChanged FINAL)
|
Q_PROPERTY(bool micaEnabled READ isMicaEnabled WRITE setMicaEnabled NOTIFY micaEnabledChanged FINAL)
|
||||||
|
|
|
@ -35,6 +35,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class StandardSystemButtonPrivate;
|
class StandardSystemButtonPrivate;
|
||||||
class FRAMELESSHELPER_WIDGETS_API StandardSystemButton : public QPushButton
|
class FRAMELESSHELPER_WIDGETS_API StandardSystemButton : public QPushButton
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(StandardSystemButton)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(StandardSystemButton)
|
||||||
Q_PROPERTY(Global::SystemButtonType buttonType READ buttonType WRITE setButtonType NOTIFY buttonTypeChanged FINAL)
|
Q_PROPERTY(Global::SystemButtonType buttonType READ buttonType WRITE setButtonType NOTIFY buttonTypeChanged FINAL)
|
||||||
Q_PROPERTY(QString glyph READ glyph WRITE setGlyph NOTIFY glyphChanged FINAL)
|
Q_PROPERTY(QString glyph READ glyph WRITE setGlyph NOTIFY glyphChanged FINAL)
|
||||||
|
|
|
@ -40,6 +40,7 @@ FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
class StandardTitleBarPrivate;
|
class StandardTitleBarPrivate;
|
||||||
class FRAMELESSHELPER_WIDGETS_API StandardTitleBar : public QWidget
|
class FRAMELESSHELPER_WIDGETS_API StandardTitleBar : public QWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_PUBLIC_QT_CLASS(StandardTitleBar)
|
FRAMELESSHELPER_PUBLIC_QT_CLASS(StandardTitleBar)
|
||||||
Q_PROPERTY(Qt::Alignment titleLabelAlignment READ titleLabelAlignment WRITE setTitleLabelAlignment NOTIFY titleLabelAlignmentChanged FINAL)
|
Q_PROPERTY(Qt::Alignment titleLabelAlignment READ titleLabelAlignment WRITE setTitleLabelAlignment NOTIFY titleLabelAlignmentChanged FINAL)
|
||||||
#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button))
|
#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button))
|
||||||
|
|
|
@ -281,7 +281,6 @@ if(NOT FRAMELESSHELPER_BUILD_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
setup_qt_stuff(TARGETS ${SUB_MODULE_TARGET})
|
setup_qt_stuff(TARGETS ${SUB_MODULE_TARGET})
|
||||||
setup_custom_moc_macros(TARGETS ${SUB_MODULE_TARGET})
|
|
||||||
|
|
||||||
set(__extra_flags "")
|
set(__extra_flags "")
|
||||||
if(NOT FRAMELESSHELPER_NO_PERMISSIVE_CHECKS)
|
if(NOT FRAMELESSHELPER_NO_PERMISSIVE_CHECKS)
|
||||||
|
|
|
@ -843,53 +843,23 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
const auto clientHeight = RECT_HEIGHT(clientRect);
|
const auto clientHeight = RECT_HEIGHT(clientRect);
|
||||||
|
|
||||||
const QPoint qtScenePos = Utils::fromNativeLocalPosition(qWindow, QPoint(nativeLocalPos.x, nativeLocalPos.y));
|
const QPoint qtScenePos = Utils::fromNativeLocalPosition(qWindow, QPoint(nativeLocalPos.x, nativeLocalPos.y));
|
||||||
|
|
||||||
const bool isFixedSize = data->callbacks->isWindowFixedSize();
|
|
||||||
const bool isTitleBar = data->callbacks->isInsideTitleBarDraggableArea(qtScenePos);
|
|
||||||
const bool dontOverrideCursor = data->callbacks->getProperty(kDontOverrideCursorVar, false).toBool();
|
|
||||||
const bool dontToggleMaximize = data->callbacks->getProperty(kDontToggleMaximizeVar, false).toBool();
|
|
||||||
|
|
||||||
if (dontToggleMaximize) {
|
|
||||||
static bool warnedOnce = false;
|
|
||||||
if (!warnedOnce) {
|
|
||||||
warnedOnce = true;
|
|
||||||
DEBUG << "To disable window maximization, you should remove the "
|
|
||||||
"WS_MAXIMIZEBOX style from the window instead. FramelessHelper "
|
|
||||||
"won't do that for you, so you'll have to do it manually yourself.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SystemButtonType sysButtonType = SystemButtonType::Unknown;
|
SystemButtonType sysButtonType = SystemButtonType::Unknown;
|
||||||
if (!isFixedSize && data->callbacks->isInsideSystemButtons(qtScenePos, &sysButtonType)) {
|
if (data->callbacks->isInsideSystemButtons(qtScenePos, &sysButtonType)) {
|
||||||
// Firstly, we set the hit test result to a default value to be able to detect whether we
|
|
||||||
// have changed it or not afterwards.
|
|
||||||
*result = HTNOWHERE;
|
|
||||||
// Even if the mouse is inside the chrome button area now, we should still allow the user
|
// Even if the mouse is inside the chrome button area now, we should still allow the user
|
||||||
// to be able to resize the window with the top or right window border, this is also the
|
// to be able to resize the window with the top or right window border, this is also the
|
||||||
// normal behavior of a native Win32 window (but only when the window is not maximized/
|
// normal behavior of a native Win32 window.
|
||||||
// fullscreened/minimized, of course).
|
static constexpr const int kBorderSize = 2;
|
||||||
if (Utils::isWindowNoState(windowId)) {
|
const bool isTop = (nativeLocalPos.y <= kBorderSize);
|
||||||
static constexpr const int kBorderSize = 2;
|
const bool isRight = (nativeLocalPos.x >= (clientWidth - kBorderSize));
|
||||||
const bool isTop = (nativeLocalPos.y <= kBorderSize);
|
if (isTop || isRight) {
|
||||||
const bool isRight = (nativeLocalPos.x >= (clientWidth - kBorderSize));
|
if (isTop && isRight) {
|
||||||
if (isTop || isRight) {
|
*result = HTTOPRIGHT;
|
||||||
if (dontOverrideCursor) {
|
} else if (isTop) {
|
||||||
// The user doesn't want the window to be resized, so we tell Windows we are
|
*result = HTTOP;
|
||||||
// in the client area so that the controls beneath the mouse cursor can still
|
} else {
|
||||||
// be hovered or clicked.
|
*result = HTRIGHT;
|
||||||
*result = (isTitleBar ? HTCAPTION : HTCLIENT);
|
|
||||||
} else {
|
|
||||||
if (isTop && isRight) {
|
|
||||||
*result = HTTOPRIGHT;
|
|
||||||
} else if (isTop) {
|
|
||||||
*result = HTTOP;
|
|
||||||
} else {
|
|
||||||
*result = HTRIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if (*result == HTNOWHERE) {
|
|
||||||
// OK, we are now really inside one of the chrome buttons, tell Windows the exact role of our button.
|
// OK, we are now really inside one of the chrome buttons, tell Windows the exact role of our button.
|
||||||
// The Snap Layout feature introduced in Windows 11 won't work without this.
|
// The Snap Layout feature introduced in Windows 11 won't work without this.
|
||||||
switch (sysButtonType) {
|
switch (sysButtonType) {
|
||||||
|
@ -910,14 +880,10 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
*result = HTCLOSE;
|
*result = HTCLOSE;
|
||||||
break;
|
break;
|
||||||
case SystemButtonType::Unknown:
|
case SystemButtonType::Unknown:
|
||||||
|
*result = HTCLIENT; // Normally we'd never enter this branch.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*result == HTNOWHERE) {
|
|
||||||
// OK, it seems we are not inside the window resize area, nor inside the chrome buttons,
|
|
||||||
// tell Windows we are in the client area to let Qt handle this event.
|
|
||||||
*result = HTCLIENT;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// OK, we are not inside of any chrome buttons, try to find out which part of the window
|
// OK, we are not inside of any chrome buttons, try to find out which part of the window
|
||||||
|
@ -927,16 +893,26 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
const bool full = Utils::isFullScreen(windowId);
|
const bool full = Utils::isFullScreen(windowId);
|
||||||
const int frameSizeY = Utils::getResizeBorderThickness(windowId, false, true);
|
const int frameSizeY = Utils::getResizeBorderThickness(windowId, false, true);
|
||||||
const bool isTop = (nativeLocalPos.y < frameSizeY);
|
const bool isTop = (nativeLocalPos.y < frameSizeY);
|
||||||
|
const bool isTitleBar = data->callbacks->isInsideTitleBarDraggableArea(qtScenePos);
|
||||||
|
const bool isFixedSize = data->callbacks->isWindowFixedSize();
|
||||||
|
const bool dontOverrideCursor = data->callbacks->getProperty(kDontOverrideCursorVar, false).toBool();
|
||||||
|
const bool dontToggleMaximize = data->callbacks->getProperty(kDontToggleMaximizeVar, false).toBool();
|
||||||
|
|
||||||
|
if (dontToggleMaximize) {
|
||||||
|
static bool once = false;
|
||||||
|
if (!once) {
|
||||||
|
once = true;
|
||||||
|
DEBUG << "To disable window maximization, you should remove the "
|
||||||
|
"WS_MAXIMIZEBOX style from the window instead. FramelessHelper "
|
||||||
|
"won't do that for you, so you'll have to do it manually yourself.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (frameBorderVisible) {
|
if (frameBorderVisible) {
|
||||||
// This will handle the left, right and bottom parts of the frame
|
// This will handle the left, right and bottom parts of the frame
|
||||||
// because we didn't change them.
|
// because we didn't change them.
|
||||||
const LRESULT originalHitTestResult = ::DefWindowProcW(hWnd, WM_NCHITTEST, 0, lParam);
|
const LRESULT originalHitTestResult = ::DefWindowProcW(hWnd, WM_NCHITTEST, 0, lParam);
|
||||||
if (originalHitTestResult != HTCLIENT) {
|
if (originalHitTestResult != HTCLIENT) {
|
||||||
// Even if the window is not resizable, we still can't return HTCLIENT here because
|
|
||||||
// when we enters this code path, it means the mouse cursor is outside of the window,
|
|
||||||
// that is, the three transparent window resize area. Returning HTCLIENT will confuse
|
|
||||||
// Windows and we can't put our controls there anyway.
|
|
||||||
*result = ((isFixedSize || dontOverrideCursor) ? HTBORDER : originalHitTestResult);
|
*result = ((isFixedSize || dontOverrideCursor) ? HTBORDER : originalHitTestResult);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -957,7 +933,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
// Return HTCLIENT instead of HTBORDER here, because the mouse is
|
// Return HTCLIENT instead of HTBORDER here, because the mouse is
|
||||||
// inside our homemade title bar now, return HTCLIENT to let our
|
// inside our homemade title bar now, return HTCLIENT to let our
|
||||||
// title bar can still capture mouse events.
|
// title bar can still capture mouse events.
|
||||||
*result = ((isFixedSize || dontOverrideCursor) ? (isTitleBar ? HTCAPTION : HTCLIENT) : HTTOP);
|
*result = ((isFixedSize || dontOverrideCursor) ? HTCLIENT : HTTOP);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isTitleBar) {
|
if (isTitleBar) {
|
||||||
|
@ -986,7 +962,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
// Return HTCLIENT instead of HTBORDER here, because the mouse is
|
// Return HTCLIENT instead of HTBORDER here, because the mouse is
|
||||||
// inside the window now, return HTCLIENT to let the controls
|
// inside the window now, return HTCLIENT to let the controls
|
||||||
// inside our window can still capture mouse events.
|
// inside our window can still capture mouse events.
|
||||||
*result = (isTitleBar ? HTCAPTION : HTCLIENT);
|
*result = HTCLIENT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isTop) {
|
if (isTop) {
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include <QtCore/qloggingcategory.h>
|
#include <QtCore/qloggingcategory.h>
|
||||||
#include <QtGui/qfontdatabase.h>
|
#include <QtGui/qfontdatabase.h>
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
|
#include <QtGui/qevent.h>
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
||||||
# include <QtGui/qguiapplication.h>
|
# include <QtGui/qguiapplication.h>
|
||||||
# include <QtGui/qstylehints.h>
|
# include <QtGui/qstylehints.h>
|
||||||
|
@ -107,6 +108,7 @@ Q_GLOBAL_STATIC(InternalData, g_internalData)
|
||||||
|
|
||||||
class InternalEventFilter : public QObject
|
class InternalEventFilter : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(InternalEventFilter)
|
FRAMELESSHELPER_QT_CLASS(InternalEventFilter)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -492,6 +492,7 @@ static inline void expblur(QImage &img, qreal radius, const bool improvedQuality
|
||||||
|
|
||||||
class WallpaperThread : public FramelessHelperThreadClass
|
class WallpaperThread : public FramelessHelperThreadClass
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(WallpaperThread)
|
FRAMELESSHELPER_QT_CLASS(WallpaperThread)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -222,6 +222,7 @@ private:
|
||||||
|
|
||||||
class NSWindowProxy : public QObject
|
class NSWindowProxy : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
FRAMELESSHELPER_QT_CLASS(NSWindowProxy)
|
FRAMELESSHELPER_QT_CLASS(NSWindowProxy)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -261,7 +261,6 @@ if(NOT FRAMELESSHELPER_BUILD_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
setup_qt_stuff(TARGETS ${SUB_MODULE_TARGET} ALLOW_KEYWORD)
|
setup_qt_stuff(TARGETS ${SUB_MODULE_TARGET} ALLOW_KEYWORD)
|
||||||
setup_custom_moc_macros(TARGETS ${SUB_MODULE_TARGET})
|
|
||||||
|
|
||||||
set(__extra_flags "")
|
set(__extra_flags "")
|
||||||
if(NOT FRAMELESSHELPER_NO_PERMISSIVE_CHECKS)
|
if(NOT FRAMELESSHELPER_NO_PERMISSIVE_CHECKS)
|
||||||
|
|
|
@ -594,10 +594,7 @@ bool FramelessQuickHelperPrivate::shouldIgnoreMouseEvents(const QPoint &pos) con
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto withinFrameBorder = [q, &pos, window]() -> bool {
|
const auto withinFrameBorder = [&pos, window]() -> bool {
|
||||||
if (q->isWindowFixedSize()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (pos.y() < kDefaultResizeBorderThickness) {
|
if (pos.y() < kDefaultResizeBorderThickness) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,6 @@ if(NOT FRAMELESSHELPER_BUILD_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
setup_qt_stuff(TARGETS ${SUB_MODULE_TARGET})
|
setup_qt_stuff(TARGETS ${SUB_MODULE_TARGET})
|
||||||
setup_custom_moc_macros(TARGETS ${SUB_MODULE_TARGET})
|
|
||||||
|
|
||||||
set(__extra_flags "")
|
set(__extra_flags "")
|
||||||
if(NOT FRAMELESSHELPER_NO_PERMISSIVE_CHECKS)
|
if(NOT FRAMELESSHELPER_NO_PERMISSIVE_CHECKS)
|
||||||
|
|
|
@ -655,9 +655,6 @@ bool FramelessWidgetsHelperPrivate::shouldIgnoreMouseEvents(const QPoint &pos) c
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto withinFrameBorder = [this, &pos]() -> bool {
|
const auto withinFrameBorder = [this, &pos]() -> bool {
|
||||||
if (isWidgetFixedSize(window)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (pos.y() < kDefaultResizeBorderThickness) {
|
if (pos.y() < kDefaultResizeBorderThickness) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue