Added Windows icon.
Use a 16x16 tray icon under Windows. Fix disk space funcion under Windows.
This commit is contained in:
@@ -129,7 +129,11 @@ void MainWidget::createTrayIcon()
|
||||
|
||||
trayIcon = new QSystemTrayIcon(this);
|
||||
trayIcon->setContextMenu(trayIconMenu);
|
||||
#ifndef Q_OS_WIN32
|
||||
trayIcon->setIcon(QIcon(":/main/resources/psv_icon.png"));
|
||||
#else
|
||||
trayIcon->setIcon(QIcon(":/main/resources/psv_icon_16.png"));
|
||||
#endif
|
||||
trayIcon->show();
|
||||
// try to avoid the iconTray Qt bug
|
||||
Sleeper::sleep(1);
|
||||
|
5
qcma.pro
5
qcma.pro
@@ -67,7 +67,8 @@ OTHER_FILES += \
|
||||
resources/psp2-updatelist.xml \
|
||||
resources/psv_icon.png \
|
||||
README.md \
|
||||
qcma.desktop
|
||||
qcma.desktop \
|
||||
qcma.rc
|
||||
|
||||
FORMS += \
|
||||
configwidget.ui \
|
||||
@@ -96,3 +97,5 @@ unix {
|
||||
target.path = $$BINDIR
|
||||
INSTALLS += target desktop icon64
|
||||
}
|
||||
|
||||
win32:RC_FILE = qcma.rc
|
||||
|
@@ -3,5 +3,6 @@
|
||||
<file>resources/psp2-updatelist.xml</file>
|
||||
<file>resources/psv_icon.png</file>
|
||||
<file>resources/translations/qcma.es.qm</file>
|
||||
<file>resources/psv_icon_16.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
resources/psv_icon_16.png
Normal file
BIN
resources/psv_icon_16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 344 B |
@@ -35,7 +35,7 @@ bool getDiskSpace(const QString &dir, quint64 *free, quint64 *total)
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
|
||||
if(GetDiskFreeSpaceExW(dir.toStdWString().c_str(), free, total, NULL) != 0) {
|
||||
if(GetDiskFreeSpaceEx(dir.toStdWString().c_str(), (ULARGE_INTEGER *)free, (ULARGE_INTEGER *)total, NULL) != 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user