mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-27 03:41:22 +08:00
update go & Qt &&
revert windows tray context menu as Qt 6.8.2 has fixed it
This commit is contained in:
parent
5bf106f25d
commit
ab22fb0d40
18
.github/workflows/build-qv2ray-cmake.yml
vendored
18
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -19,19 +19,19 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- cross_os: public_res
|
- cross_os: public_res
|
||||||
cross_arch: public_res
|
cross_arch: public_res
|
||||||
go_version: "1.23.5"
|
go_version: "1.24"
|
||||||
- cross_os: windows
|
- cross_os: windows
|
||||||
cross_arch: amd64
|
cross_arch: amd64
|
||||||
go_version: "1.23.5"
|
go_version: "1.24"
|
||||||
- cross_os: linux
|
- cross_os: linux
|
||||||
cross_arch: amd64
|
cross_arch: amd64
|
||||||
go_version: "1.23.5"
|
go_version: "1.24"
|
||||||
- cross_os: darwin
|
- cross_os: darwin
|
||||||
cross_arch: amd64
|
cross_arch: amd64
|
||||||
go_version: "1.23.5"
|
go_version: "1.24"
|
||||||
- cross_os: darwin
|
- cross_os: darwin
|
||||||
cross_arch: arm64
|
cross_arch: arm64
|
||||||
go_version: "1.23.5"
|
go_version: "1.24"
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -73,16 +73,16 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- platform: windows-latest
|
- platform: windows-latest
|
||||||
qt_version: "6.8.1"
|
qt_version: "6.8.2"
|
||||||
target: amd64
|
target: amd64
|
||||||
- platform: ubuntu-latest
|
- platform: ubuntu-latest
|
||||||
qt_version: "6.8.1"
|
qt_version: "6.8.2"
|
||||||
target: amd64
|
target: amd64
|
||||||
- platform: macos-latest
|
- platform: macos-latest
|
||||||
qt_version: "6.8.1"
|
qt_version: "6.8.2"
|
||||||
target: x86_64
|
target: x86_64
|
||||||
- platform: macos-latest
|
- platform: macos-latest
|
||||||
qt_version: "6.8.1"
|
qt_version: "6.8.2"
|
||||||
target: arm64
|
target: arm64
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|||||||
@ -311,22 +311,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||||||
trayMenu->addAction(ui->actionRestart_Program);
|
trayMenu->addAction(ui->actionRestart_Program);
|
||||||
trayMenu->addAction(ui->menu_exit);
|
trayMenu->addAction(ui->menu_exit);
|
||||||
tray->show();
|
tray->show();
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
tray->setContextMenu(trayMenu);
|
tray->setContextMenu(trayMenu);
|
||||||
#else
|
|
||||||
// popup once so that its height is calculated
|
|
||||||
trayMenu->popup(QCursor::pos());
|
|
||||||
trayMenu->hide();
|
|
||||||
#endif
|
|
||||||
connect(tray, &QSystemTrayIcon::activated, qApp, [=](QSystemTrayIcon::ActivationReason reason) {
|
connect(tray, &QSystemTrayIcon::activated, qApp, [=](QSystemTrayIcon::ActivationReason reason) {
|
||||||
if (reason == QSystemTrayIcon::Context)
|
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
int mh = trayMenu->geometry().height();
|
|
||||||
auto cPos = QCursor::pos();
|
|
||||||
trayMenu->popup({cPos.x(), cPos.y()-mh});
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
if (reason == QSystemTrayIcon::Trigger) {
|
if (reason == QSystemTrayIcon::Trigger) {
|
||||||
if (this->isVisible()) {
|
if (this->isVisible()) {
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user