mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-06-28 11:55:08 +03:00
{SEV-0015] Dark theme for the Client Manager (#16)
This commit is contained in:
parent
4809047501
commit
23f1620e16
111
src/Cedar/CM.c
111
src/Cedar/CM.c
@ -571,6 +571,16 @@ void CmEasyDlgInit(HWND hWnd, CM_EASY_DLG *d)
|
|||||||
|
|
||||||
SetShow(hWnd, B_VGC, cm->Client->IsVgcSupported);
|
SetShow(hWnd, B_VGC, cm->Client->IsVgcSupported);
|
||||||
|
|
||||||
|
const HWND accountListView = GetDlgItem(hWnd, L_ACCOUNT);
|
||||||
|
const COLORREF outlineColor = RGB(94, 73, 116);
|
||||||
|
const COLORREF textColor = RGB(255, 255, 255);
|
||||||
|
const COLORREF backgroundColor = RGB(62, 62, 62);
|
||||||
|
const COLORREF textBackColor = RGB(56, 56, 56);
|
||||||
|
ListView_SetBkColor(accountListView, backgroundColor);
|
||||||
|
ListView_SetTextBkColor(accountListView, textBackColor);
|
||||||
|
ListView_SetTextColor(accountListView, textColor);
|
||||||
|
ListView_SetOutlineColor(accountListView, outlineColor);
|
||||||
|
|
||||||
CmEasyDlgRefresh(hWnd, d);
|
CmEasyDlgRefresh(hWnd, d);
|
||||||
|
|
||||||
num = LvNum(hWnd, L_ACCOUNT);
|
num = LvNum(hWnd, L_ACCOUNT);
|
||||||
@ -694,12 +704,44 @@ void CmEasyDlgRefresh(HWND hWnd, CM_EASY_DLG *d)
|
|||||||
CmEasyDlgUpdate(hWnd, d);
|
CmEasyDlgUpdate(hWnd, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL CmEasyDrawItem(const WORD itemId, DRAWITEMSTRUCT* drawItem)
|
||||||
|
{
|
||||||
|
switch(itemId)
|
||||||
|
{
|
||||||
|
case IDCANCEL:
|
||||||
|
case B_STATUS:
|
||||||
|
case B_VGC:
|
||||||
|
case IDOK:
|
||||||
|
{
|
||||||
|
SetBkMode(drawItem->hDC, TRANSPARENT);
|
||||||
|
SetTextColor(drawItem->hDC, RGB(255, 255, 255));
|
||||||
|
const int textLen = GetWindowTextLengthA(drawItem->hwndItem);
|
||||||
|
char* text = (char*)malloc(textLen + 1);
|
||||||
|
GetWindowTextA(drawItem->hwndItem, text, textLen + 1);
|
||||||
|
DrawTextA(drawItem->hDC, text, textLen, &drawItem->rcItem, DT_CENTER | DT_VCENTER | DT_NOCLIP | DT_SINGLELINE | DT_MODIFYSTRING);
|
||||||
|
free(text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Dialog procedure of the simple connection manager
|
// Dialog procedure of the simple connection manager
|
||||||
UINT CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
INT_PTR CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
||||||
{
|
{
|
||||||
CM_EASY_DLG *d = (CM_EASY_DLG *)param;
|
CM_EASY_DLG *d = (CM_EASY_DLG *)param;
|
||||||
NMHDR *n;
|
NMHDR *n;
|
||||||
UINT i;
|
UINT i;
|
||||||
|
|
||||||
|
static HBRUSH dialogBrush = NULL;
|
||||||
|
static HBRUSH buttonBrush = NULL;
|
||||||
|
static HBRUSH connectButtonBrush = NULL;
|
||||||
|
static HBRUSH listboxBrush = NULL;
|
||||||
|
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (hWnd == NULL)
|
if (hWnd == NULL)
|
||||||
{
|
{
|
||||||
@ -711,6 +753,12 @@ UINT CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
|||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
CmEasyDlgInit(hWnd, d);
|
CmEasyDlgInit(hWnd, d);
|
||||||
SetTimer(hWnd, 1, 10, NULL);
|
SetTimer(hWnd, 1, 10, NULL);
|
||||||
|
|
||||||
|
dialogBrush = CreateSolidBrush(RGB(22, 22, 22));
|
||||||
|
buttonBrush = CreateSolidBrush(RGB(50, 50, 50));
|
||||||
|
connectButtonBrush = CreateSolidBrush(RGB(105, 0, 209));
|
||||||
|
listboxBrush = CreateSolidBrush(RGB(58, 58, 58));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_TIMER:
|
case WM_TIMER:
|
||||||
@ -733,7 +781,7 @@ UINT CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
n = (NMHDR *)lParam;
|
n = (NMHDR*)lParam;
|
||||||
CmEasyDlgOnNotify(hWnd, d, n);
|
CmEasyDlgOnNotify(hWnd, d, n);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -741,7 +789,7 @@ UINT CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
|||||||
i = LvGetSelected(hWnd, L_ACCOUNT);
|
i = LvGetSelected(hWnd, L_ACCOUNT);
|
||||||
if (i != INFINITE)
|
if (i != INFINITE)
|
||||||
{
|
{
|
||||||
wchar_t *s = LvGetStr(hWnd, L_ACCOUNT, i, 0);
|
wchar_t* s = LvGetStr(hWnd, L_ACCOUNT, i, 0);
|
||||||
if (s != NULL)
|
if (s != NULL)
|
||||||
{
|
{
|
||||||
UniStrCpy(cm->EasyLastSelectedAccountName, sizeof(cm->EasyLastSelectedAccountName),
|
UniStrCpy(cm->EasyLastSelectedAccountName, sizeof(cm->EasyLastSelectedAccountName),
|
||||||
@ -753,8 +801,52 @@ UINT CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
|||||||
{
|
{
|
||||||
Zero(cm->EasyLastSelectedAccountName, sizeof(cm->EasyLastSelectedAccountName));
|
Zero(cm->EasyLastSelectedAccountName, sizeof(cm->EasyLastSelectedAccountName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeleteObject(dialogBrush);
|
||||||
|
DeleteObject(buttonBrush);
|
||||||
|
DeleteObject(connectButtonBrush);
|
||||||
|
DeleteObject(listboxBrush);
|
||||||
|
|
||||||
|
dialogBrush = NULL;
|
||||||
|
buttonBrush = NULL;
|
||||||
|
connectButtonBrush = NULL;
|
||||||
|
listboxBrush = NULL;
|
||||||
|
|
||||||
EndDialog(hWnd, false);
|
EndDialog(hWnd, false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case WM_DRAWITEM:
|
||||||
|
{
|
||||||
|
return (INT_PTR)CmEasyDrawItem((WORD)wParam, (DRAWITEMSTRUCT*)lParam);
|
||||||
|
}
|
||||||
|
case WM_CTLCOLORDLG:
|
||||||
|
{
|
||||||
|
return (INT_PTR)dialogBrush;
|
||||||
|
}
|
||||||
|
case WM_CTLCOLORBTN:
|
||||||
|
{
|
||||||
|
const int id = GetDlgCtrlID((HWND)lParam);
|
||||||
|
if (id == IDOK)
|
||||||
|
{
|
||||||
|
return (INT_PTR)connectButtonBrush;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (INT_PTR)buttonBrush;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
case WM_CTLCOLORSCROLLBAR:
|
||||||
|
{
|
||||||
|
return (INT_PTR)dialogBrush;
|
||||||
|
}
|
||||||
|
case WM_CTLCOLORSTATIC:
|
||||||
|
{
|
||||||
|
HDC hdc = (HDC)wParam;
|
||||||
|
SetTextColor(hdc, RGB(255, 255, 255));
|
||||||
|
SetBkColor(hdc, RGB(22, 22, 22));
|
||||||
|
return (INT_PTR)dialogBrush;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -781,7 +873,7 @@ void CmMainWindowOnShowEasy(HWND hWnd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog(NULL, D_CM_EASY, CmEasyDlg, &d);
|
DialogEx(NULL, D_CM_EASY, CmEasyDlg, &d, false);
|
||||||
|
|
||||||
cm->hEasyWnd = NULL;
|
cm->hEasyWnd = NULL;
|
||||||
}
|
}
|
||||||
@ -10488,16 +10580,7 @@ void CmRefreshAccountListEx2(HWND hWnd, bool easy, bool style_changed)
|
|||||||
|
|
||||||
// Switching of icon / detail view
|
// Switching of icon / detail view
|
||||||
LvSetView(hWnd, L_ACCOUNT, cm->IconView == false || easy);
|
LvSetView(hWnd, L_ACCOUNT, cm->IconView == false || easy);
|
||||||
|
LvRemoveStyle(hWnd, L_ACCOUNT, LVS_EX_GRIDLINES);
|
||||||
// Show grid
|
|
||||||
if (cm->ShowGrid || easy)
|
|
||||||
{
|
|
||||||
LvSetStyle(hWnd, L_ACCOUNT, LVS_EX_GRIDLINES);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LvRemoveStyle(hWnd, L_ACCOUNT, LVS_EX_GRIDLINES);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (style_changed)
|
if (style_changed)
|
||||||
{
|
{
|
||||||
|
@ -532,7 +532,7 @@ void CmMainWindowOnTrayClicked(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
|||||||
void CmShowEasy();
|
void CmShowEasy();
|
||||||
void CmCloseEasy();
|
void CmCloseEasy();
|
||||||
void CmMainWindowOnShowEasy(HWND hWnd);
|
void CmMainWindowOnShowEasy(HWND hWnd);
|
||||||
UINT CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param);
|
INT_PTR CmEasyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param);
|
||||||
void CmEasyDlgInit(HWND hWnd, CM_EASY_DLG *d);
|
void CmEasyDlgInit(HWND hWnd, CM_EASY_DLG *d);
|
||||||
void CmEasyDlgUpdate(HWND hWnd, CM_EASY_DLG *d);
|
void CmEasyDlgUpdate(HWND hWnd, CM_EASY_DLG *d);
|
||||||
void CmEasyDlgRefresh(HWND hWnd, CM_EASY_DLG *d);
|
void CmEasyDlgRefresh(HWND hWnd, CM_EASY_DLG *d);
|
||||||
|
@ -3720,19 +3720,19 @@ BEGIN
|
|||||||
END
|
END
|
||||||
|
|
||||||
D_CM_EASY DIALOGEX 0, 0, 307, 223
|
D_CM_EASY DIALOGEX 0, 0, 307, 223
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_SYSMENU
|
||||||
CAPTION "@D_CM_EASY"
|
CAPTION "@D_CM_EASY"
|
||||||
FONT 9, "MS Shell Dlg", 400, 0, 0x80
|
FONT 9, "MS Shell Dlg", 400, 0, 0x80
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL ICO_TRAY1,IDC_STATIC,"Static",SS_BITMAP,0,0,308,46
|
CONTROL ICO_TRAY1,IDC_STATIC,"Static",SS_BITMAP,0,0,308,46
|
||||||
LTEXT "@S_TITLE",S_TITLE,12,52,267,17
|
LTEXT "@S_TITLE",S_TITLE,12,52,267,17
|
||||||
CONTROL "",L_ACCOUNT,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_AUTOARRANGE | LVS_EDITLABELS | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,7,88,293,82
|
CONTROL "",L_ACCOUNT,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_AUTOARRANGE | LVS_EDITLABELS | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,7,88,293,82
|
||||||
PUSHBUTTON "--BUTTON--",IDOK,92,173,123,21
|
PUSHBUTTON "--BUTTON--",IDOK,92,173,123,21,BS_OWNERDRAW
|
||||||
LTEXT "--INFO--",S_INFO,12,72,288,14
|
LTEXT "--INFO--",S_INFO,12,72,288,14
|
||||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,198,294,1
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,198,294,1
|
||||||
PUSHBUTTON "@IDCANCEL",IDCANCEL,247,203,53,16
|
PUSHBUTTON "@IDCANCEL",IDCANCEL,247,203,53,16,BS_OWNERDRAW
|
||||||
PUSHBUTTON "@B_STATUS",B_STATUS,216,176,84,16
|
PUSHBUTTON "@B_STATUS",B_STATUS,216,176,84,16,BS_OWNERDRAW
|
||||||
PUSHBUTTON "@B_VGC",B_VGC,112,203,84,16
|
PUSHBUTTON "@B_VGC",B_VGC,112,203,84,16,BS_OWNERDRAW
|
||||||
END
|
END
|
||||||
|
|
||||||
D_SM_SETUP DIALOGEX 0, 0, 447, 311
|
D_SM_SETUP DIALOGEX 0, 0, 447, 311
|
||||||
|
@ -992,11 +992,11 @@ CM_IMPORT_MESSAGE From file "%S", GAMING LAUNCHER Connection Setting "%s" has b
|
|||||||
CM_VLAN_CREATING Creating a new Virtual Network Adapter for Windows. \r\n\r\nThis process can take several seconds or over a minute. \r\nPlease wait...\r\n\r\n(Please do not perform other operations while the Virtual Network Adapter is being installed.)
|
CM_VLAN_CREATING Creating a new Virtual Network Adapter for Windows. \r\n\r\nThis process can take several seconds or over a minute. \r\nPlease wait...\r\n\r\n(Please do not perform other operations while the Virtual Network Adapter is being installed.)
|
||||||
CM_SETTING_PASSWORD The setting is locked. To remove the setting-locker, you must enter a password.
|
CM_SETTING_PASSWORD The setting is locked. To remove the setting-locker, you must enter a password.
|
||||||
CM_EASY_MODE_NOT_ON_REMOTE Unable to connect because of the GAMING LAUNCHER Client on the remote computer is running in Easy Mode.
|
CM_EASY_MODE_NOT_ON_REMOTE Unable to connect because of the GAMING LAUNCHER Client on the remote computer is running in Easy Mode.
|
||||||
CM_EASY_CONNECT_BUTTON_1 Start GAMING LAUNCHER &Connection
|
CM_EASY_CONNECT_BUTTON_1 Start &Connection
|
||||||
CM_EASY_CONNECT_BUTTON_2 &Disconnect
|
CM_EASY_CONNECT_BUTTON_2 &Disconnect
|
||||||
CM_EASY_ACCOUNT_WARNING You can only modify Proxy Server Setting, User Authentication and Virtual Network Adapter Used because the setting has been locked.
|
CM_EASY_ACCOUNT_WARNING You can only modify Proxy Server Setting, User Authentication and Virtual Network Adapter Used because the setting has been locked.
|
||||||
CM_EASY_INFO_1 Select a GAMING LAUNCHER connection.
|
CM_EASY_INFO_1 Select a GAMING LAUNCHER connection.
|
||||||
CM_EASY_INFO_2 Click Start GAMING LAUNCHER Connection to start a Game connection.
|
CM_EASY_INFO_2 Click Start Connection to start a Game connection.
|
||||||
CM_EASY_INFO_3 GAMING LAUNCHER connection is active. You can disconnect by clicking Disconnect.
|
CM_EASY_INFO_3 GAMING LAUNCHER connection is active. You can disconnect by clicking Disconnect.
|
||||||
CM_EXT_VOICE_MSG It is possible that some of the voice message contents of the Extension Voice Guide has not been played normally. \r\nIs the Extension Voice Guide enabled?
|
CM_EXT_VOICE_MSG It is possible that some of the voice message contents of the Extension Voice Guide has not been played normally. \r\nIs the Extension Voice Guide enabled?
|
||||||
CM_EASY_TITLE GAMING LAUNCHER Connection Manager
|
CM_EASY_TITLE GAMING LAUNCHER Connection Manager
|
||||||
|
@ -991,11 +991,11 @@ CM_IMPORT_MESSAGE From file "%S", GAMING LAUNCHER Connection Setting "%s" has b
|
|||||||
CM_VLAN_CREATING Creating a new Virtual Network Adapter for Windows. \r\n\r\nThis process can take several seconds or over a minute. \r\nPlease wait...\r\n\r\n(Please do not perform other operations while the Virtual Network Adapter is being installed.)
|
CM_VLAN_CREATING Creating a new Virtual Network Adapter for Windows. \r\n\r\nThis process can take several seconds or over a minute. \r\nPlease wait...\r\n\r\n(Please do not perform other operations while the Virtual Network Adapter is being installed.)
|
||||||
CM_SETTING_PASSWORD The setting is locked. To remove the setting-locker, you must enter a password.
|
CM_SETTING_PASSWORD The setting is locked. To remove the setting-locker, you must enter a password.
|
||||||
CM_EASY_MODE_NOT_ON_REMOTE Unable to connect because of the GAMING LAUNCHER Client on the remote computer is running in Easy Mode.
|
CM_EASY_MODE_NOT_ON_REMOTE Unable to connect because of the GAMING LAUNCHER Client on the remote computer is running in Easy Mode.
|
||||||
CM_EASY_CONNECT_BUTTON_1 Start GAMING LAUNCHER &Connection
|
CM_EASY_CONNECT_BUTTON_1 Start &Connection
|
||||||
CM_EASY_CONNECT_BUTTON_2 &Disconnect
|
CM_EASY_CONNECT_BUTTON_2 &Disconnect
|
||||||
CM_EASY_ACCOUNT_WARNING You can only modify Proxy Server Setting, User Authentication and Virtual Network Adapter Used because the setting has been locked.
|
CM_EASY_ACCOUNT_WARNING You can only modify Proxy Server Setting, User Authentication and Virtual Network Adapter Used because the setting has been locked.
|
||||||
CM_EASY_INFO_1 Select a GAMING LAUNCHER connection.
|
CM_EASY_INFO_1 Select a GAMING LAUNCHER connection.
|
||||||
CM_EASY_INFO_2 Click Start GAMING LAUNCHER Connection to start a connection.
|
CM_EASY_INFO_2 Click Start Connection to start a connection.
|
||||||
CM_EASY_INFO_3 GAMING LAUNCHER connection is active. You can disconnect by clicking Disconnect.
|
CM_EASY_INFO_3 GAMING LAUNCHER connection is active. You can disconnect by clicking Disconnect.
|
||||||
CM_EXT_VOICE_MSG It is possible that some of the voice message contents of the Extension Voice Guide has not been played normally. \r\nIs the Extension Voice Guide enabled?
|
CM_EXT_VOICE_MSG It is possible that some of the voice message contents of the Extension Voice Guide has not been played normally. \r\nIs the Extension Voice Guide enabled?
|
||||||
CM_EASY_TITLE GAMING LAUNCHER Connection Manager
|
CM_EASY_TITLE GAMING LAUNCHER Connection Manager
|
||||||
|
Loading…
Reference in New Issue
Block a user