mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
chore: change tray icon
This commit is contained in:
@@ -63,7 +63,7 @@ void BuildAppIcon(SectionBuilder &builder, AyuSectionBuilder &ayu) {
|
||||
};
|
||||
});
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined Q_OS_WIN || defined Q_OS_MAC
|
||||
builder.addDivider();
|
||||
builder.addSkip();
|
||||
ayu.addSettingToggle({
|
||||
|
||||
@@ -44,6 +44,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/hidsystem/ev_keymap.h>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
||||
|
||||
@interface MainWindowObserver : NSObject {
|
||||
}
|
||||
|
||||
@@ -311,7 +315,9 @@ void MainWindow::unreadCounterChangedHook() {
|
||||
}
|
||||
|
||||
void MainWindow::updateDockCounter() {
|
||||
const auto counter = Core::App().unreadBadge();
|
||||
const auto counter = AyuSettings::getInstance().hideNotificationBadge()
|
||||
? 0
|
||||
: Core::App().unreadBadge();
|
||||
|
||||
const auto string = !counter
|
||||
? QString()
|
||||
|
||||
@@ -22,6 +22,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#import <AppKit/NSMenu.h>
|
||||
#import <AppKit/NSStatusItem.h>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
||||
|
||||
@interface CommonDelegate : NSObject<NSMenuDelegate> {
|
||||
}
|
||||
|
||||
@@ -200,8 +204,10 @@ void UpdateIcon(const NSStatusItem *status) {
|
||||
auto resultActive = result;
|
||||
resultActive.detach();
|
||||
|
||||
const auto counter = Core::App().unreadBadge();
|
||||
const auto muted = Core::App().unreadBadgeMuted();
|
||||
const auto &settings = AyuSettings::getInstance();
|
||||
|
||||
const auto counter = settings.hideNotificationBadge() ? 0 : Core::App().unreadBadge();
|
||||
const auto muted = settings.hideNotificationBadge() ? 0 : Core::App().unreadBadgeMuted();
|
||||
|
||||
const auto &bg = (muted ? st::trayCounterBgMute : st::trayCounterBg);
|
||||
const auto &fg = st::trayCounterFg;
|
||||
|
||||
Reference in New Issue
Block a user