This commit is contained in:
pokamest 2020-11-25 23:47:33 +03:00
parent d0a24eb225
commit 9553163c76
15 changed files with 52 additions and 2 deletions

Binary file not shown.

Binary file not shown.

BIN
client/fonts/Lato-Heavy.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

BIN
client/images/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
client/images/main.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity name="amneziavpn.amneziavpn" version="0.0.0.1" processorArchitecture="x86" type="win32" />
<description>amneziavpn</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View file

@ -0,0 +1,37 @@
#include "macos_functions.h"
#include <QDebug>
#import <AppKit/AppKit.h>
MacOSFunctions &MacOSFunctions::instance()
{
static MacOSFunctions s;
return s;
}
MacOSFunctions::MacOSFunctions()
{
registerThemeNotification();
}
bool MacOSFunctions::isMenuBarUseDarkTheme() const
{
NSDictionary *dict = [[NSUserDefaults standardUserDefaults] persistentDomainForName:NSGlobalDomain];
id style = [dict objectForKey:@"AppleInterfaceStyle"];
BOOL darkModeOn = ( style && [style isKindOfClass:[NSString class]] && NSOrderedSame == [style caseInsensitiveCompare:@"dark"] );
return darkModeOn;
}
void MacOSFunctions::registerThemeNotification()
{
// [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(darkModeChanged:) name:@"AppleInterfaceThemeChangedNotification" object:nil];
}
void darkModeChanged(NSNotification*notif)
{
Q_UNUSED(notif);
qDebug() << "Dark mode changed" << MacOSFunctions::instance().isMenuBarUseDarkTheme();
}

View file

@ -12,8 +12,6 @@
<file>images/controls/radio_on.png</file>
<file>images/download.png</file>
<file>images/upload.png</file>
<file>images/controls/checkbox_hover.png</file>
<file>images/controls/checkbox_unchecked.png</file>
<file>images/tray/active.png</file>
<file>images/tray/default.png</file>
<file>images/tray/error.png</file>