Fixed dialog layout with RTL languages

This commit is contained in:
Birunthan Mohanathas 2012-06-19 13:52:07 +03:00
parent 431fa7b736
commit 15380f1697
41 changed files with 10 additions and 22 deletions

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.

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.

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.

View File

@ -2,6 +2,14 @@
#include "../Library/resource.h"
#include "../Version.h"
#ifdef LANGUAGE_RTL
#define DIALOG_EXSTYLE_FLAGS WS_EX_APPWINDOW | WS_EX_CONTROLPARENT | WS_EX_LAYOUTRTL
#define STR_ISRTL "1"
#else
#define DIALOG_EXSTYLE_FLAGS WS_EX_APPWINDOW | WS_EX_CONTROLPARENT
#define STR_ISRTL "0"
#endif
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
/////////////////////////////////////////////////////////////////////////////
@ -137,7 +145,7 @@ IDR_MANAGESKINS_MENU MENU
IDD_ABOUT_DIALOG DIALOGEX 0, 0, 400, 210
STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW | WS_EX_CONTROLPARENT
EXSTYLE DIALOG_EXSTYLE_FLAGS
CAPTION STR_ABOUTRAINMETER
FONT 8, "MS Shell Dlg 2", 0, 0, 0x0
{
@ -187,7 +195,7 @@ FONT 8, "MS Shell Dlg 2", 0, 0, 0x0
IDD_MANAGE_DIALOG DIALOGEX 0, 0, 500, 322
STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW | WS_EX_CONTROLPARENT
EXSTYLE DIALOG_EXSTYLE_FLAGS
CAPTION STR_MANAGERAINMETER
FONT 8, "MS Shell Dlg 2", 0, 0, 0x0
{

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.

Binary file not shown.

Binary file not shown.

View File

@ -65,11 +65,6 @@ INT_PTR CDialog::OnActivate(WPARAM wParam, LPARAM lParam)
return FALSE;
}
void CDialog::SetDialogRTL(HWND window)
{
SetWindowLongPtr(window, GWL_EXSTYLE, GetWindowLongPtr(window, GWL_EXSTYLE) | WS_EX_LAYOUTRTL);
}
/*
** Sets dialog font to UI font.
**

View File

@ -53,9 +53,6 @@ protected:
INT_PTR OnActivate(WPARAM wParam, LPARAM lParam);
void SetDialogRTL(HWND window);
void SetDialogRTL() { SetDialogRTL(m_Window); }
void SetDialogFont(HWND window);
void SetDialogFont() { SetDialogFont(m_Window); }

View File

@ -260,12 +260,6 @@ INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam)
HICON hIcon = GetIcon(IDI_RAINMETER);
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
if (*GetString(ID_STR_ISRTL) == L'1')
{
// Use RTL layout if using a RTL language
SetDialogRTL();
}
item = GetDlgItem(m_Window, IDC_ABOUT_TAB);
TCITEM tci = {0};
tci.mask = TCIF_TEXT;

View File

@ -212,12 +212,6 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
HICON hIcon = GetIcon(IDI_RAINMETER);
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
if (*GetString(ID_STR_ISRTL) == L'1')
{
// Use RTL layout if using a RTL language
SetDialogRTL();
}
item = GetDlgItem(m_Window, IDC_MANAGE_TAB);
TCITEM tci = {0};
tci.mask = TCIF_TEXT;