Commit Graph

1079 Commits

Author SHA1 Message Date
Yuhang Zhao 8667d1996e cmake: add some experimental flags, but commented out
Uncomment out if they are verified to work well.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-13 20:02:02 +08:00
Yuhang Zhao 0ceb0e85c1 win: remove one confusing assert
It works well for msvc but it also confuses a lot of people, so let's remove it.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-13 17:46:23 +08:00
Yuhang Zhao 221f1c12aa fix button size can't be changed
widget: fix the bug
quick: add the interface to change size

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-13 17:38:10 +08:00
Yuhang Zhao 119d10930b win: minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-13 11:02:53 +08:00
Yuhang Zhao 55fe04000e add more comments
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-11 10:43:48 +08:00
Jan Kowalewicz 6a46844853
win: Qt version check for #155 (#157) 2022-09-11 10:23:01 +08:00
Yuhang Zhao 9cf8ba959d mac: fix build 2022-09-10 17:56:39 +08:00
Jan Kowalewicz f2affbca85
win: fix build with Qt 5.14 and MinGW (#155) 2022-09-10 16:38:40 +08:00
Yuhang Zhao 33c3eaa05a win: add missing definitions for mingw
Fixes: #153
Fixes: #154

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-10 16:04:17 +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 6fe35a667e cmake: fix build error
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-07 13:44:08 +08:00
Yuhang Zhao 5d494453bc update readme
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-06 13:48:52 +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 fb13ff1c1b improve macos experience [2/2]
Add support for old Qt version and old macOS version.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-06 11:31:07 +08:00
Yuhang Zhao 2411343f42 update readme
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-05 17:35:02 +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 5018d9ea82 widget: add support for changing title font
Not needed for Qt Quick, because you can easily to change it:

```qml
StandardTitleBar {
    titleLabel {
        font {
            family: "Arial"
            pointSize: 10
            italic: true
        }
    }
}
```

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-02 10:39:45 +08:00
Yuhang Zhao f052a087de bump version to v2.2.1
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-01 16:47:49 +08:00
Yuhang Zhao ba343fbbd4 win: fix bug when using Qt 5.14 and below
Fixes: #152

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-01 16:45:32 +08:00
Yuhang Zhao 6b1a37a82a win: fix null pointer access in some rare cases
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-01 10:51:50 +08:00
Yuhang Zhao 012721d9a0 demo: add missing definition
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 16:47:40 +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 abf4b29dca minor fixes of the last commit
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 10:45:26 +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 e55afa2fe3 simplify a function
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-28 20:08:44 +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 5195a27022 linux: adapt to latest qtbase changes
The X11 QPA has gained the ability to detect runtime theme changes in Qt 6.4.0

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-27 13:07:01 +08:00
Yuhang Zhao c3338cd9b7 win: don't use round corner when fullscreen on win11
Fixes: #149

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-26 15:54:56 +08:00
Yuhang Zhao 406c801383 Remove unneeded function
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-25 11:16:50 +08:00
Yuhang Zhao de3d5440db simplify code a little
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-22 18:02:03 +08:00
Yuhang Zhao f484209b94 win: fix round error on some systems
Fixes: #146

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-22 13:57:21 +08:00
Yuhang Zhao 6ddf79ba9c demo: fix build on qt5
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-22 13:00:33 +08:00
Yuhang Zhao 6c060b3946 demo: add shortcut to switch between fullscreen state
Can also help use better debugging the old style window frame
issue on Windows.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-21 15:38:43 +08:00
Yuhang Zhao 1bce57445b win: use qt own functions more
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-19 10:53:46 +08:00
Yuhang Zhao a49756ee45 registrykey: rename
RegistryKey is a better name than Registry.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-17 10:42:48 +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 08a38f1d73 update ignore list
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-04 14:32:45 +08:00
Yuhang Zhao beb16bfdc2 linux: minor improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-04 10:32:32 +08:00
Yuhang Zhao 2f872732b5 tool: minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-03 17:53:17 +08:00
Yuhang Zhao 9343c7a088 macos: remove needless version check
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-03 09:41:29 +08:00
Yuhang Zhao f4f56498c2 win32: minor improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-30 17:26:27 +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 cf83b050d2 common: minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-29 15:36:28 +08:00
Yuhang Zhao 4fe67c9313 cmake: minor improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-27 09:36:28 +08:00
Yuhang Zhao 14a3440bbf win32: fix typo
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-25 09:35:02 +08:00
Yuhang Zhao 1264fe8341 minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-24 14:54:55 +08:00
Yuhang Zhao b2f443a592 cmake: minor tweaks of msvc flags
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-21 13:57:13 +08:00
Yuhang Zhao 0aea6c3658 tool: update the dpitester tool
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-19 14:23:41 +08:00