mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Follow device pixel ratio in TrayIconFile
This commit is contained in:
parent
4623804123
commit
e081ed4b4a
1 changed files with 4 additions and 4 deletions
|
@ -262,12 +262,12 @@ bool IsIndicatorApplication() {
|
||||||
|
|
||||||
std::unique_ptr<QTemporaryFile> TrayIconFile(
|
std::unique_ptr<QTemporaryFile> TrayIconFile(
|
||||||
const QIcon &icon,
|
const QIcon &icon,
|
||||||
int size,
|
QObject *parent = nullptr) {
|
||||||
QObject *parent) {
|
|
||||||
static const auto templateName = AppRuntimeDirectory()
|
static const auto templateName = AppRuntimeDirectory()
|
||||||
+ kTrayIconFilename.utf16();
|
+ kTrayIconFilename.utf16();
|
||||||
|
|
||||||
const auto desiredSize = QSize(size, size);
|
const auto dpr = style::DevicePixelRatio();
|
||||||
|
const auto desiredSize = QSize(22 * dpr, 22 * dpr);
|
||||||
|
|
||||||
auto ret = std::make_unique<QTemporaryFile>(
|
auto ret = std::make_unique<QTemporaryFile>(
|
||||||
templateName,
|
templateName,
|
||||||
|
@ -524,7 +524,7 @@ void MainWindow::setSNITrayIcon(int counter, bool muted) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto icon = TrayIconGen(counter, muted);
|
const auto icon = TrayIconGen(counter, muted);
|
||||||
_trayIconFile = TrayIconFile(icon, 22, this);
|
_trayIconFile = TrayIconFile(icon, this);
|
||||||
|
|
||||||
if (_trayIconFile) {
|
if (_trayIconFile) {
|
||||||
// indicator-application doesn't support tooltips
|
// indicator-application doesn't support tooltips
|
||||||
|
|
Loading…
Add table
Reference in a new issue