mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 04:19:09 +02:00
Gtk2: fixed LTOR & RTOL for complex widgets (listviews etc). fixes #16865
git-svn-id: trunk@26505 -
This commit is contained in:
parent
690be5c15b
commit
d2fd11cca9
@ -242,15 +242,25 @@ class procedure TGtk2WSWinControl.SetBiDiMode(const AWinControl : TWinControl;
|
||||
);
|
||||
const
|
||||
WidgetDirection : array[boolean] of longint = (GTK_TEXT_DIR_LTR, GTK_TEXT_DIR_RTL);
|
||||
var
|
||||
Info: PWidgetInfo;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetBiDiMode') then
|
||||
Exit;
|
||||
|
||||
gtk_widget_set_direction(PGtkWidget(AWinControl.Handle),
|
||||
WidgetDirection[UseRightToLeftAlign]);
|
||||
Info := GetWidgetInfo(PGtkWidget(AWinControl.Handle));
|
||||
if Info <> nil then
|
||||
begin
|
||||
if Info^.CoreWidget <> nil then
|
||||
gtk_widget_set_direction(Info^.CoreWidget,
|
||||
WidgetDirection[UseRightToLeftAlign]);
|
||||
if Info^.ClientWidget <> nil then
|
||||
gtk_widget_set_direction(Info^.ClientWidget,
|
||||
WidgetDirection[UseRightToLeftAlign]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function Gtk1GetText(const AWinControl: TWinControl; var AText: String): Boolean;
|
||||
var
|
||||
CS: PChar;
|
||||
|
Loading…
Reference in New Issue
Block a user