Commit Graph

28 Commits

Author SHA1 Message Date
Yuhang Zhao 2c106ffef9 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-01 15:26:36 +08:00
Yuhang Zhao 2b6d0fccb6 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-23 11:04:48 +08:00
Yuhang Zhao 233ebba3ec Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-20 09:58:00 +08:00
Yuhang Zhao f30339ff54 Minor cleanup
1. Remove unneeded functions
2. Rename some functions and variables to match their real functionality

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-19 10:43:10 +08:00
Yuhang Zhao 151e8a1664 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-06 10:54:11 +08:00
Yuhang Zhao c29c4cc409 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-28 11:08:12 +08:00
Yuhang Zhao fe2d5716e2 Fix old Qt build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-25 16:35:32 +08:00
Yuhang Zhao 5938fcb475 Internal refactor
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-25 14:17:32 +08:00
Yuhang Zhao 987a8397dc Fix old Qt build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-02 13:26:40 +08:00
Yuhang Zhao 74607b2e45 Fix old qt build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-02 09:48:04 +08:00
Yuhang Zhao e0b5244420 Rename function
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-01 13:10:05 +08:00
Yuhang Zhao 4139cf0ab2 redesign API 2021-05-31 11:52:32 +08:00
Yuhang Zhao 23d53fef87 Fix inverted logic
Amends commit 6adbefa814

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 10:17:01 +08:00
Yuhang Zhao 6adbefa814 Simplify code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 09:12:19 +08:00
Yuhang Zhao 9cb0ff7073 Remove unneeded include
Amends commit ae603926fc

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-15 20:03:12 +08:00
Julien ae603926fc
Update framelesswindowsmanager.cpp
simple fix without the 500ms lag
2021-03-15 12:04:48 +01:00
Yuhang Zhao 0d7f3dba7e Win32: fix the multi-monitor issue again
This solution have no run-time overhead.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-13 11:07:49 +08:00
Yuhang Zhao f70158a276 Add cross-platform Acrylic Effect
Currently still lacking Linux and macOS support,
but will be added sooner.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 14:10:55 +08:00
zhengchangfa 7d844ab95f fix compile 2020-12-08 15:21:18 +08:00
Yuhang Zhao 68bc4c31ed Cleanup
WinNativeEventFilter:
1. Removed all unused functions and macros.
Win32 API prototypes are not touched because
we may still need them in the future.
2. Don't store data through SetWindowLongPtrW,
using dynamic properties of QWindow instead.
People may rely on GetWindowLongPtrW(hwnd, GWLP_USERDATA)
to do their own work.
3. Some helper functions are removed, such as
moveWindowToDesktopCenter(). You can implement them
yourself. Keep them in the source code will keep
pulling in new dependencies so I have to get rid
of them.
4. Some blocks are removed, such as WM_GETMINMAXIINFO.
It's not needed. You can call Qt's standard API now,
such as setMaximumSize() and setMinimumSize().

FramelessQuickHelper:
1. Removed all functions that can be replaced by Qt's
own API, such as setMaximumSize() and setMinimumSize().
2. Removed helper functions, such as moveWindowToDesktopCenter().
You can implement them yourself. Just few lines of code.

FramelessWindowsManager:
Adapt to the above changes.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-28 11:54:56 +08:00
Yuhang Zhao bd60d9d1d2 Remove the widget and quick dependency for UNIX as well
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-18 12:07:29 +08:00
Yuhang Zhao 137019f7e6 Refactor
Use QWindow pointer on all platforms.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-17 15:08:39 +08:00
Yuhang Zhao b672851f51 Win32: Remove the dependency of the widgets and quick module
This commit totally removed the dependency of the widgets
and quick modules for the Windows platform. Now the library
itself only depends on the core and gui modules. Currently
no bug can be found. But there are some side effects: one is
we can't set a palette for a widget due to we can't access
QWidget specific functions so if you want to enable blur
effect, you will have to do this by yourself. Another one is
you now have to pass the window handle to WinNativeEventFilter
instead of the pointer of a QObject. Before this patch, I'm
using QWidget::winId() to get the window handle, now we have
get rid of the widgets dependency so I can't get the window
handle now, you have to pass it explicitly. And it leads to
huge refactoring of the whole repository. But I think it's
worth doing. If anyone knows how to get the window handle
without introducing new dependencies, please tell me. It will
help me a lot.

To remove the quick dependency, the FramelessQuickHelper class
is moved out of the library now. If your project needs it,
please copy the files to your project and include them directly.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-16 23:01:00 +08:00
Yuhang Zhao c783bc1fe2 Minor tweaks.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-12 11:34:41 +08:00
Yuhang Zhao 47910161c9 Fix build for old Qt versions.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-19 18:24:38 +08:00
Yuhang Zhao 073ad117ba Minor tweaks.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-17 13:08:47 +08:00
Yuhang Zhao b736936a8a Update.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-15 10:41:35 +08:00
Yuhang Zhao 5fc425fc64 Update.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-14 18:36:13 +08:00