Commit Graph

78 Commits

Author SHA1 Message Date
Altair Wei 0e63a053de fix examples on MacOS 2021-10-06 22:05:15 +08:00
Altair Wei af797125f8 fix bug when resizing on handler's edge on Linux 2021-10-06 17:02:15 +08:00
Altair Wei cefae7950d default titlebar height and resize border 2021-10-06 15:40:23 +08:00
Altair Wei 183aa9a730 integrate Windows implementation into 2.0 Core API 2021-10-06 15:10:53 +08:00
Altair Wei ce69d1a4c5 implement Core API on MacOS 2021-10-02 14:19:46 +08:00
Altair Wei 6a6fea8ac9 improve resize handler db click behavior 2021-09-21 17:56:43 +08:00
Altair Wei 989de57f33 fix HiDPI position calculate error 2021-09-21 15:42:11 +08:00
Altair Wei 9b2dc893b6 double click resize handler will change geometry 2021-09-20 20:40:03 +08:00
Altair Wei 5f58937588 add hitTestVisible logic 2021-09-20 19:41:24 +08:00
Altair Wei 5ab2024f54 only allow left button to move or resize 2021-09-20 16:54:52 +08:00
Altair Wei 0964483b20 enlarge the resize corner area 2021-09-20 16:45:30 +08:00
Altair Wei 96f49ded2f fix move and resize determination 2021-09-20 14:47:49 +08:00
Altair Wei 1aed38e882 double click make window maximized 2021-09-20 09:19:04 +08:00
Altair Wei 501ff149cf implemented X11 resizing 2021-09-20 09:10:04 +08:00
Altair Wei a365499455 implemented linux x11 moving 2021-09-20 00:08:43 +08:00
Altair Wei 93ac6f6ee3 minimal example that only depends on Core API 2021-09-19 22:24:00 +08:00
Altair Wei 678f903f5c update hovered states 2021-09-19 21:32:32 +08:00
Altair Wei da342753a2 change cursor according mouse state 2021-09-19 17:47:14 +08:00
Altair Wei 3784ef0e7f map position to frame section 2021-09-13 19:59:35 +08:00
Altair Wei 1e2598398d backbone of new FramelessHelper 2021-09-13 12:22:09 +08:00
Yuhang Zhao bc8a70dbb2 Win32: Fix window content will be cut-off for some pixels when window is fullscreened
1. Fix that bug
2. Some adjustments of the variable names to make them more clear
3. Some tweaks to the title bar height value

TODO: Add a button to switch between fullscreen and windowed mode for the widget example
TODO: Add a title text to the widget example

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-04 22:40:13 +08:00
Yuhang Zhao 2c106ffef9 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-01 15:26:36 +08:00
Altair Wei 01dd43c356
fix unwanted cursor change when leave edge region (#80) 2021-08-23 09:29:50 +08:00
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