mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Added support for RTL languages.
This commit is contained in:
parent
6594246bf4
commit
e1aafc9705
@ -51,6 +51,17 @@ CDialog::~CDialog()
|
|||||||
DeleteObject(m_FontBold);
|
DeleteObject(m_FontBold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** SetRTL
|
||||||
|
**
|
||||||
|
** Enables RTL layout.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
void CDialog::SetRTL()
|
||||||
|
{
|
||||||
|
SetWindowLong(m_Window, GWL_EXSTYLE, GetWindowLong(m_Window, GWL_EXSTYLE) | WS_EX_LAYOUTRTL);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** SetDialogFont
|
** SetDialogFont
|
||||||
**
|
**
|
||||||
|
@ -28,6 +28,8 @@ protected:
|
|||||||
CDialog(HWND wnd);
|
CDialog(HWND wnd);
|
||||||
virtual ~CDialog();
|
virtual ~CDialog();
|
||||||
|
|
||||||
|
void SetRTL();
|
||||||
|
|
||||||
void SetDialogFont();
|
void SetDialogFont();
|
||||||
|
|
||||||
HWND m_Window;
|
HWND m_Window;
|
||||||
|
@ -218,6 +218,12 @@ INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam)
|
|||||||
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
|
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
|
||||||
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
||||||
|
|
||||||
|
if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0)
|
||||||
|
{
|
||||||
|
// Use RTL layout if using a RTL language
|
||||||
|
SetRTL();
|
||||||
|
}
|
||||||
|
|
||||||
HWND item = GetDlgItem(m_Window, IDC_ABOUT_TAB);
|
HWND item = GetDlgItem(m_Window, IDC_ABOUT_TAB);
|
||||||
TCITEM tci = {0};
|
TCITEM tci = {0};
|
||||||
tci.mask = TCIF_TEXT;
|
tci.mask = TCIF_TEXT;
|
||||||
|
@ -202,6 +202,12 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
|
|||||||
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
|
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
|
||||||
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
||||||
|
|
||||||
|
if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0)
|
||||||
|
{
|
||||||
|
// Use RTL layout if using a RTL language
|
||||||
|
SetRTL();
|
||||||
|
}
|
||||||
|
|
||||||
HWND item = GetDlgItem(m_Window, IDC_MANAGE_TAB);
|
HWND item = GetDlgItem(m_Window, IDC_MANAGE_TAB);
|
||||||
TCITEM tci = {0};
|
TCITEM tci = {0};
|
||||||
tci.mask = TCIF_TEXT;
|
tci.mask = TCIF_TEXT;
|
||||||
|
@ -125,6 +125,8 @@
|
|||||||
#define ID_STR_NEWVERSIONREQUIRED 2043
|
#define ID_STR_NEWVERSIONREQUIRED 2043
|
||||||
#define ID_STR_NOMETERSINSKIN 2044
|
#define ID_STR_NOMETERSINSKIN 2044
|
||||||
#define ID_STR_INCLUDEINFINITELOOP 2045
|
#define ID_STR_INCLUDEINFINITELOOP 2045
|
||||||
|
#define ID_STR_ABOUTRAINMETER 2046
|
||||||
|
#define ID_STR_MANAGERAINMETER 2047
|
||||||
|
|
||||||
#define ID_CONTEXT_REFRESH 4001
|
#define ID_CONTEXT_REFRESH 4001
|
||||||
#define ID_CONTEXT_QUIT 4002
|
#define ID_CONTEXT_QUIT 4002
|
||||||
|
Loading…
Reference in New Issue
Block a user