mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:40:26 +02:00
LCL: setBidiMode in CreateWnd, so all ws are correctly updated.fixes #16818
git-svn-id: trunk@26365 -
This commit is contained in:
parent
fe2b7dfcaf
commit
985aea5d22
@ -7135,6 +7135,9 @@ begin
|
||||
if not HandleAllocated then
|
||||
RaiseGDBException('Handle creation failed creating '+DbgSName(Self));
|
||||
//debugln('TWinControl.CreateWnd update constraints ... ',DbgSName(Self));
|
||||
TWSWinControlClass(WidgetSetClass).SetBiDiMode(Self,
|
||||
UseRightToLeftAlignment, UseRightToLeftReading, UseRightToLeftScrollBar);
|
||||
|
||||
Constraints.UpdateInterfaceConstraints;
|
||||
InvalidateClientRectCache(False);
|
||||
TWSWinControlClass(WidgetSetClass).ConstraintsChange(Self);
|
||||
|
@ -242,19 +242,11 @@ class procedure TGtk2WSWinControl.SetBiDiMode(const AWinControl : TWinControl;
|
||||
const
|
||||
WidgetDirection : array[boolean] of longint = (GTK_TEXT_DIR_LTR, GTK_TEXT_DIR_RTL);
|
||||
begin
|
||||
gtk_widget_set_direction(PGtkWidget(AWinControl.Handle), WidgetDirection[UseRightToLeftAlign]);
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetBiDiMode') then
|
||||
Exit;
|
||||
|
||||
if UseRightToLeftReading then // By default GTK2 support bidi regardless of the layout
|
||||
begin
|
||||
end
|
||||
else begin
|
||||
end;
|
||||
|
||||
if UseRightToLeftScrollBar then // I don't know how to do it for now (if possible)
|
||||
begin
|
||||
end
|
||||
else begin
|
||||
end;
|
||||
gtk_widget_set_direction(PGtkWidget(AWinControl.Handle),
|
||||
WidgetDirection[UseRightToLeftAlign]);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1611,8 +1611,7 @@ begin
|
||||
ChildOfComplexWidget := ccwNone;
|
||||
// creates the widget
|
||||
Widget := CreateWidget(FParams);
|
||||
if LCLObject.BiDiMode = bdRightToLeft then
|
||||
setLayoutDirection(QtRightToLeft);
|
||||
|
||||
// retrieve default cursor on create
|
||||
FDefaultCursor := QCursor_create();
|
||||
QWidget_cursor(Widget, FDefaultCursor);
|
||||
|
Loading…
Reference in New Issue
Block a user