Altair Wei
6acfdfdf61
improve titlebar move behavor ( #74 )
2021-08-15 12:32:42 +08:00
Yuhang Zhao
ebc8792630
Fix Qt6 build
...
The function name has been changed in Qt6.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-08-13 15:36:31 +08:00
Altair Wei
027545fcc2
fix interrupted db-clicked behavior on titlebar ( #73 )
2021-08-13 14:39:18 +08:00
Altair Wei
018d904ca4
fix resize indicator position on 4K screen Linux ( #71 )
2021-08-13 11:32:09 +08:00
Yuhang Zhao
5a2d498445
Minor tweaks
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-08-11 17:58:47 +08:00
Yuhang Zhao
870b7820ae
Fix Qt 5.15 compilation error
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-25 18:15:59 +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
b44cfb4474
Refactor UNIX version
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-21 17:14:55 +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
5938fcb475
Internal refactor
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-25 14:17:32 +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
2a10b0f7c8
More cleanup
...
static_cast will always succeed, not need to check.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-01 10:12:55 +08:00
Yuhang Zhao
e769d10a19
Further cleanup
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-01 09:42:43 +08:00
Yuhang Zhao
4139cf0ab2
redesign API
2021-05-31 11:52:32 +08:00
Yuhang Zhao
86dcad3f3a
Simplify code
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 10:42:08 +08:00
Yuhang Zhao
6bc6ed63cc
Minor tweaks
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 09:48:55 +08:00
Yuhang Zhao
07290f9aeb
Fix coordinate bug for FramelessHelper too
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 15:17:01 +08:00
Yuhang Zhao
310b44b8c4
Skip invisible objects
...
Fixes : #40
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-24 10:30:46 +08:00
Yuhang Zhao
684b05ccad
Simplify FramelessHelper code
...
Remove unused code.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-04 11:41:54 +08:00
Yuhang Zhao
84ce2eb418
Simplify the code a bit
...
There is a type called QObjectList already.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-20 20:52:12 +08:00
Yuhang Zhao
8e78e275e4
Add a cross-platform frameless window example
...
Written in pure Qt. Cross-platform.
Lacking the system features on Windows of course.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-19 12:20:11 +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
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
f35407ce5c
Minor tweaks.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-12 20:34:12 +08:00
Yuhang Zhao
f597b64f46
Minor tweaks.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-09 20:22:31 +08:00
Yuhang Zhao
d3152df01f
UNIX: resize: fix wrong logic.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-05 20:19:04 +08:00
Yuhang Zhao
b5e497e6ff
UNIX: fall back to traditional way.
...
The startSystemMove and startSystemResize may
return false on some systems, just fallback to
use the old way to move and resize the window.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-05 18:25:44 +08:00
Yuhang Zhao
1cc4d92aca
Minor improvements.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-26 17:36:40 +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
c0de790138
Fix Linux build.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-18 14:15:13 +08:00
Yuhang Zhao
904bbb8576
Remove QPointer usages.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-15 21:06:58 +08:00
Yuhang Zhao
5fc425fc64
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-14 18:36:13 +08:00
Yuhang Zhao
12253c8a50
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-10 12:41:43 +08:00
Yuhang Zhao
a36e4fb81b
Fix build with Qt6
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-10-08 09:46:57 +08:00
Yuhang Zhao
43012e2681
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-08-01 11:45:12 +08:00
Yuhang Zhao
1cd1b0cc2b
Adapt to Qt6 changes, again.
...
Forgot to change this file.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-07-26 09:33:41 +08:00
Yuhang Zhao
807dda608e
Adapt to new style.
...
1. Use QList instead of QVector because QVector will become an alias of QList since Qt6.
2. Don't use *const because the account of const is too large.
3. New style applied, by Clang Format.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-06-27 14:19:09 +08:00
Yuhang Zhao
8ec1cfcf35
Minor improvements.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-23 21:52:40 +08:00
Yuhang Zhao
d28e3d167c
Add a way to ignore title bar.
...
If a window is in fullscreen mode, it should not have a title bar.
Maybe a rare use case, but better than nothing.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-17 17:35:09 +08:00
Yuhang Zhao
86269c82b3
Avoid name conflicts.
...
They can be compiled but to reduce confusion, let change their names.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-13 13:19:27 +08:00
Yuhang Zhao
921b87ab2e
Minor improvements.
...
Use global screen coordinates instead of local window coordinates to get more reliable hit test result.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-13 12:56:03 +08:00
Yuhang Zhao
2ca6a90ae2
Add a Qt Quick helper class.
...
It's much easier to use it in Qt Quick now.
Fixes : #11
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-12 20:53:53 +08:00
Yuhang Zhao
48ff3280b1
UNIX helper: Use QSize instead of QRect
...
We only need the size, not the geometry.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 12:50:07 +08:00
Yuhang Zhao
a34834c3f7
Fix bugs in UNIX helper.
...
Found during using it in a real project.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-10 20:24:11 +08:00
Yuhang Zhao
57d2667c5e
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 13:13:42 +08:00
Yuhang Zhao
ae62a8fb49
Minor improvements.
...
Move the moveWindowToDesktopCenter function to FramelessHelper.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 11:33:20 +08:00
Yuhang Zhao
0fe297b5e4
Add UNIX helper back.
...
With some improvements.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 21:07:44 +08:00
Yuhang Zhao
7753161f9f
Add Qt Quick example.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 14:19:41 +08:00
Yuhang Zhao
4e1d324100
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-17 21:39:36 +08:00