mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed dialog layout with RTL languages
This commit is contained in:
parent
431fa7b736
commit
15380f1697
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Language/Czech.h
BIN
Language/Czech.h
Binary file not shown.
Binary file not shown.
BIN
Language/Dutch.h
BIN
Language/Dutch.h
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Language/Greek.h
BIN
Language/Greek.h
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.
@ -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.
@ -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.
|
||||
**
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user