mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Added guards for colorSchemechanged and Qt::ColorScheme. updated workflow to save apt cache
This commit is contained in:
@@ -33,6 +33,14 @@ jobs:
|
||||
# Share repository cache between workflows.
|
||||
repository-cache: true
|
||||
|
||||
- name: Cache apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /var/cache/apt/archives
|
||||
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/release-nearby-qml-tray.yaml') }}
|
||||
restore-keys: apt-${{ runner.os }}-
|
||||
save-always: true
|
||||
|
||||
- name: Install Linux build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
||||
@@ -155,10 +155,12 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
QObject::connect(&app, &QCoreApplication::aboutToQuit, &controller,
|
||||
[&controller]() { controller.stop(); });
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
QObject::connect(app.styleHints(), &QStyleHints::colorSchemeChanged, &tray,
|
||||
[&tray, &resolve_tray_icon](Qt::ColorScheme) {
|
||||
tray.setIcon(resolve_tray_icon());
|
||||
});
|
||||
#endif
|
||||
|
||||
tray.setContextMenu(&tray_menu);
|
||||
tray.show();
|
||||
|
||||
Reference in New Issue
Block a user