Commit Graph

22 Commits

Author SHA1 Message Date
Zhao Yuhang a6c7b44b5d moc: code cleanup 2023-11-03 20:35:34 +08:00
Yuhang Zhao d86f55832f refactor 2023-10-04 11:37:39 +08:00
Yuhang Zhao 6abb636a19 large refactor 2023-08-27 15:12:06 +08:00
Yuhang Zhao f7368d0a08 widgets: PIMPL refactor 2023-08-25 17:50:22 +08:00
Yuhang Zhao a130fef677 win: refactor 2023-08-23 18:04:31 +08:00
SineStriker 8ac3d747a1
Fix hover event and system buttons (#262)
* Fix hover event

* Fix system button
2023-08-19 14:48:26 +08:00
Yuhang Zhao c6ca6cc794 include std headers, avoid transitive include 2023-07-29 15:57:03 +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 3d37d87c81 win: tweak some enum values
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-03 11:18:08 +08:00
Yuhang Zhao 4896869123 use better name
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-01-18 10:00:18 +08:00
Yuhang Zhao f00adba67c replace QScopedPointer with std::unique_ptr
QScopedPointer is being deprecated in latest qtbase code.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-12 11:59:53 +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 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 1b36587f14 widgets: emulate Windows behavior more
On Windows, when you left click the window icon in the title bar, the system menu will be triggered.
And when you double click it, the window will be closed.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-14 13:30:08 +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 7a35b09a74 add limited qmake support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 16:34:30 +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 2806cc811b code simplification, minor re-structure
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-07 13:43:09 +08:00
Yuhang Zhao e8dcb6e6fe add api to set title bar and chrome button color
TODO:
1. Special handling for the close button
2. Move QuickChromePalette class to own files
3. More testing

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-05 17:58:04 +08:00
Yuhang Zhao 888f9d0aca standardsystembutton: use icon font instead of svg images
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-06-24 18:04:49 +08:00
Yuhang Zhao 5c3b8b70df general: fix the system button background color in various cases
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-12 17:25:10 +08:00
Yuhang Zhao 286811c9df expose private headers, someone may need
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-07 18:02:44 +08:00