mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
ui fixes
This commit is contained in:
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.
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 |
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -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>
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user