Commit Graph

88 Commits

Author SHA1 Message Date
Yuhang Zhao 41e91bb39a win: fix wrong restore geometry when after DPI changes 2023-04-25 15:19:31 +08:00
Yuhang Zhao 3b8571401f minor refactor 2023-04-11 17:09:58 +08:00
Yuhang Zhao b5c9f85f62 allow user force use system blur
Signed-off-by: Yuhang Zhao <zhaoyuhang@rankyee.com>
2023-03-30 14:16:34 +08:00
Yuhang Zhao a0c825930e win: allow user disable specific system menu items
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-24 15:40:08 +08:00
Yuhang Zhao 9e341e4e40 examples: update cmake project
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-19 16:31:24 +08:00
Yuhang Zhao f6383c5832 ci: fix ci
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-19 13:00:11 +08:00
Yuhang Zhao 9a81cf1503 cmake: improve the package code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-19 12:36:41 +08:00
Yuhang Zhao 8b6dd746eb refactor
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-06 15:08:19 +08:00
Yuhang Zhao fc92783af9 misc modifications
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-05 18:54:34 +08:00
Yuhang Zhao 14ccc990cf general refactor, remove useless code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-05 14:01:46 +08:00
Yuhang Zhao ed75e2f3e8 adapt to latest Qt code style
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-01-27 18:16:32 +08:00
Yuhang Zhao 378aa7db12 fix nested frameless windows & other minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-01-18 13:43:51 +08:00
Yuhang Zhao 819ffb79fb macOS: widgets: preserve the native title bar elements
Quick part to be done.
2023-01-14 18:32:47 +08:00
Yuhang Zhao 840cf3060d general fixes
fixed some minor issues

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-19 11:35:05 +08:00
Yuhang Zhao c3fa2f6920 minor fixes of previous commit 2022-12-16 10:48:38 +08:00
Yuhang Zhao ed3771c949 replace qRound with std::round
It's better to do so.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-12 09:34:46 +08:00
Yuhang Zhao b1f52837d2 replace qAsConst with std::as_const
qAsConst is being deprecated in latest qtbase code.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-12 09:30:16 +08:00
Yuhang Zhao cb88b602fe minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-05 14:33:38 +08:00
Yuhang Zhao 7daa1facc7 fix build on Qt version < 6.2.1
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-04 14:49:16 +08:00
Yuhang Zhao 48a1106fc0 Allow build with no private Qt modules
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-04 14:25:09 +08:00
Yuhang Zhao 1cf5a53ecb fix build error
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-24 10:47:55 +08:00
Yuhang Zhao a26df61c33 win: fix multi-monitor bug, take 3
#141
#184

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-24 10:38:21 +08:00
Yuhang Zhao ff5b171566 win: final fix of the multi-monitor bug
#141
#184

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-23 14:54:46 +08:00
Yuhang Zhao ebd3d6573f win: fix the multi monitor window expand issue
#141
#184

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-22 15:03:11 +08:00
Yuhang Zhao 3791802d3b win: add support for mica alt and other tweaks
Add some more comments to the windows header.
Remove the usages of UseRoundWindowCorner.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-16 14:10:49 +08:00
Yuhang Zhao 07bd39d1aa win: minor improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-06 19:28:25 +08:00
Yuhang Zhao ac6a2c11a7 win: minor improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-06 15:52:25 +08:00
Yuhang Zhao fe6fb8ef5f win: add new win10 subver
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-19 17:15:23 +08:00
Yuhang Zhao e2f7c76c88 win: minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-16 13:41:41 +08:00
Yuhang Zhao 87da6cb5da move static_assert to cpp source files
To speed up compilation time.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-13 09:44:50 +08:00
Yuhang Zhao b9f5cf79c0 win32: add support for dark theme menu
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-11 16:17:04 +08:00
Yuhang Zhao 92415fb61c Add WindowBorderPainter and WindowBorder
1. Added WindowBorderPainter for QtWidgets
2. Added WindowBorder for QtQuick (uses WindowBorderPainter internally)
3. Adjust some header includes
4. Limit a Linux workaround to the appropriate Qt versions

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-10 13:35:37 +08:00
Yuhang Zhao b50a2dcd72 fix Qt5 compilation error
And change to lazy initialization for Mica Material.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-09 10:08:49 +08:00
Yuhang Zhao d483c39b9a add way to disable window maximization
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-08 15:25:22 +08:00
Yuhang Zhao 34596db939 fix various issues found by user
Issue list:

1. MinGW lacks some definitions so there's compilation errors
2. The chrome buttons' foreground color is incorrect when the window is inactive.
3. Adapt to new macros from Qt dev branch.
4. Remove unneeded parameter from setApplicationOSThemeAware().

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-10 13:11:55 +08:00
Yuhang Zhao 7dda58deaf free all resources during destruction
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-06 13:40:16 +08:00
Yuhang Zhao f2a6d35908 improve macos code [1/2]
1. Simplify code a little
2. Use Qt functionalities as many as possible.
3. Prepare for adding old Qt support.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-05 16:55:55 +08:00
Yuhang Zhao b9f65aa783 add frameless dialog & demo
And some other minor fixes.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-05 15:00:02 +08:00
Yuhang Zhao 7a35b09a74 add limited qmake support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 16:34:30 +08:00
Yuhang Zhao 463ac0a999 add window icon support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 10:21:24 +08:00
Yuhang Zhao ce78c037b1 add some helper functionalities
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-28 19:25:22 +08:00
Yuhang Zhao 0535276f55 win: use Qt functionalities as much as possible
If Qt provides the functionalities we need, use it
instead of reinventing the wheel.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-16 15:24:14 +08:00
Yuhang Zhao 3dbeb2721a minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-06 12:01:12 +08:00
Yuhang Zhao 775b1a2aab minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-30 11:34:14 +08:00
Yuhang Zhao 7616161699 Implement homemade Mica material & other improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-16 15:25:15 +08:00
Yuhang Zhao 7e3a735a7d minor tweaks and improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-09 12:10:41 +08:00
Yuhang Zhao 9a93475f2b fix typo: snap layouts --> snap layout
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-07 17:00:15 +08:00
Yuhang Zhao 011b4a85f5 fix Qt5 build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-07 16:22:34 +08:00
Yuhang Zhao aed1673855 win32: remove the limit to the manifest file
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-05 10:36:34 +08:00
Yuhang Zhao 71f8a5aab1 add blurBehindWindowEnabled property
Current only implements for Windows,
macOS will be implemented later,
Linux won't be supported in the near future.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-03 16:01:19 +08:00