Implemented window coord mirroring for RTL. This

is only implemented for *setting* the coordinates
    which is enough for wxSizers and 99% or other
    dialogs to work.
  Also reversed the meaning of wxStaticText alignment
    in RTL mode. It is possible that later versions
    of GTK actually do that themselves. (?)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-09-10 19:39:22 +00:00
parent 1d203ed837
commit 6959763942
5 changed files with 60 additions and 30 deletions

View File

@@ -72,6 +72,15 @@ bool wxStaticText::Create(wxWindow *parent,
justify = GTK_JUSTIFY_RIGHT;
else // wxALIGN_LEFT is 0
justify = GTK_JUSTIFY_LEFT;
if (GetLayoutDirection() == wxLayout_RightToLeft)
{
if (justify == GTK_JUSTIFY_RIGHT)
justify = GTK_JUSTIFY_LEFT;
if (justify == GTK_JUSTIFY_LEFT)
justify = GTK_JUSTIFY_RIGHT;
}
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2