Commit Graph

66 Commits

Author SHA1 Message Date
Zhao Yuhang a6c7b44b5d moc: code cleanup 2023-11-03 20:35:34 +08:00
Zhao Yuhang 78fc5057ab misc: general cleanup 2023-10-21 10:44:07 +08:00
Zhao Yuhang ff4b9f3879 minor tweaks 2023-10-15 13:16:10 +08:00
Yuhang Zhao d86f55832f refactor 2023-10-04 11:37:39 +08:00
Zhao Yuhang 66206aa420 cmake: update 2023-09-10 14:28:38 +08:00
Yuhang Zhao 6abb636a19 large refactor 2023-08-27 15:12:06 +08:00
SineStriker 2d639071cc
Fix bugs after mouse press (#270) 2023-08-26 16:04:29 +08:00
Yuhang Zhao 3bc44c267d core: PIMPL refactor 2023-08-24 14:41:43 +08:00
Yuhang Zhao 4a1f5fb1f4 win: replace an old workaround with new one 2023-08-24 10:24:33 +08:00
Yuhang Zhao 54e3f6232e mica material: fix high dpi scaling 2023-08-19 15:33:11 +08:00
Yuhang Zhao 8d3ef93885 win: fix theme not updating 2023-08-05 13:46:23 +08:00
Yuhang Zhao 86bc1c0142 cleanup & optimize, part 2
The file size of FramelessHelper binaries should be smaller than before. Core: Win32 MSVC2022 x64 release build, -20KB
The general performance should be improved, due to double lookups are all eliminated.
2023-07-30 18:28:38 +08:00
Yuhang Zhao c6ca6cc794 include std headers, avoid transitive include 2023-07-29 15:57:03 +08:00
Yuhang Zhao 4ed21585b4 cleanup core module
Core mostly done. TODO: Widgets & Quick module
2023-07-29 15:29:38 +08:00
Yuhang Zhao d71dc75b77 mica material: fix drawing on multi-monitor scenario 2023-07-15 16:10:48 +08:00
Yuhang Zhao d1b4aadb76 mica material: use separate thread to do time-consuming task 2023-07-02 13:48:38 +08:00
Yuhang Zhao 617a015b97 mica material: minor fixes of previous implementation 2023-07-02 11:44:54 +08:00
Yuhang Zhao 7c0d8c4b11 mica material: support reading very large image files 2023-07-01 18:16:57 +08:00
Yuhang Zhao 8d5ea49d52 allow user override system theme
Task-number: #216
2023-05-18 16:08:33 +08:00
Yuhang Zhao a3cfa59d1d improve dpi change experience
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-05-13 11:30:54 +08:00
Yuhang Zhao 4d063369fa mica material: add fallback color and fix the qtquick one
I don't understand why I didn't make QuickMicaMaterial configurable.
2023-04-27 10:36:47 +08:00
Yuhang Zhao a375bc6748 sysapiloader: minor improvements of previous refactor
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-17 09:59:41 +08:00
Yuhang Zhao 02f70d1ade sysapiloader: minor improvements
And some other minor refactors.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-16 14:55:26 +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 3d37d87c81 win: tweak some enum values
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-02-03 11:18:08 +08:00
Yuhang Zhao 69ef2a6ca1 linux: fix potential segment faults
Fixes: #199

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2023-01-24 16:57:44 +08:00
Yuhang Zhao 8a1dcfb808 minor refactor
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-23 10:11:59 +08:00
Yuhang Zhao 34ba90376b linux: remove the build-time dependency of libxcb and libgtk
We can load them dynamically at run-time.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-15 15:48:56 +08:00
Yuhang Zhao 8683a14a3c fix compilation error
fixes: #191

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-12-15 13:09:51 +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 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 9715bd9d4b minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-11-03 13:52:57 +08:00
trbogdanov 31849d1c12
gcc and qt-5.12.0 compilation error fix (#171)
Compililation with gcc (any version) and Qt 5.12.0 (important) fails with error:
```
Core/private/sysapiloader_p.h:59:26: error: no matching function for call to ‘QMutex::QMutex()’
     static inline QMutex m_mutex;
                          ^~~~~~~
include/QtCore/qmutex.h:165:5: note: candidate: ‘QMutex::QMutex(const QMutex&)’ <deleted>
     Q_DISABLE_COPY(QMutex)
     ^~~~~~~~~~~~~~
```

`QMutex` in Qt 5.12.0 has explicit (!) one-parameter constructor with a
default value: `QMutex(QMutex::RecursionMode mode = NonRecursive)` and no
default constructor. In this case declaring static inline member without
initializer causes the above error.
2022-10-26 17:13:53 +08:00
Yuhang Zhao 53bf6016df win: simplify code a little
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-20 17:26:55 +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 f15ca8daf0 fix various issues
1. Fix mica material doesn't work normally when used on multiple windows.
2. Fix build on Qt5.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-12 14:08:58 +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 fcf51d6d73 refactor
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-10-11 11:52:49 +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 07101273bd win: refactor & simplify
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-26 11:18:13 +08:00
Yuhang Zhao 47bf4da5ae allow user to remove a window from the frameless window list
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-20 15:56:59 +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 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 7a35b09a74 add limited qmake support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 16:34:30 +08:00