View Issue Details

IDProjectCategoryView StatusLast Update
0028867PatchesLCLpublic2015-10-28 14:39
ReporterZaher DirkeyAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0028867: [Bidi] Patch Fix StringGrid DrawCell RTL
DescriptionMake string grid cell draw right to left if bidimode is right to left and right alignment.
Tagsbidi
Fixed in Revisionr50187
LazTarget-
Widgetset
Attached Files
  • fix-aliengment-rtl-stringgrids.pas.patch (705 bytes)
    Index: lcl/grids.pas
    ===================================================================
    --- lcl/grids.pas	(revision 49867)
    +++ lcl/grids.pas	(working copy)
    @@ -3599,7 +3599,10 @@
         CurrentTextStyle.SingleLine := (gc = nil) or (not gc.Title.MultiLine);
         Canvas.TextStyle := CurrentTextStyle;
       end else begin
    -    Canvas.TextStyle := DefaultTextStyle;
    +    CurrentTextStyle := DefaultTextStyle;
    +    CurrentTextStyle.Alignment := BidiFlipAlignment(CurrentTextStyle.Alignment, UseRightToLeftAlignment);
    +    CurrentTextStyle.RightToLeft := UseRightToLeftAlignment;
    +    Canvas.TextStyle := CurrentTextStyle;
         Canvas.Brush.Color := clWindow;
         Canvas.Font.Color := clWindowText;
       end;
    

Activities

Zaher Dirkey

2015-10-16 23:53

reporter  

fix-aliengment-rtl-stringgrids.pas.patch (705 bytes)
Index: lcl/grids.pas
===================================================================
--- lcl/grids.pas	(revision 49867)
+++ lcl/grids.pas	(working copy)
@@ -3599,7 +3599,10 @@
     CurrentTextStyle.SingleLine := (gc = nil) or (not gc.Title.MultiLine);
     Canvas.TextStyle := CurrentTextStyle;
   end else begin
-    Canvas.TextStyle := DefaultTextStyle;
+    CurrentTextStyle := DefaultTextStyle;
+    CurrentTextStyle.Alignment := BidiFlipAlignment(CurrentTextStyle.Alignment, UseRightToLeftAlignment);
+    CurrentTextStyle.RightToLeft := UseRightToLeftAlignment;
+    Canvas.TextStyle := CurrentTextStyle;
     Canvas.Brush.Color := clWindow;
     Canvas.Font.Color := clWindowText;
   end;

Zaher Dirkey

2015-10-16 23:53

reporter   ~0086637

please use only fix-aliengment-rtl-stringgrids.pas.patch

Juha Manninen

2015-10-27 23:16

developer   ~0086926

Applied, thanks.

Issue History

Date Modified Username Field Change
2015-10-16 23:44 Zaher Dirkey New Issue
2015-10-16 23:44 Zaher Dirkey File Added: bidi-cells-stringgrids.pas.patch
2015-10-16 23:53 Zaher Dirkey File Added: fix-aliengment-rtl-stringgrids.pas.patch
2015-10-16 23:53 Zaher Dirkey Note Added: 0086637
2015-10-16 23:53 Zaher Dirkey Tag Attached: bidi
2015-10-19 14:58 Maxim Ganetsky File Deleted: bidi-cells-stringgrids.pas.patch
2015-10-27 19:00 Juha Manninen Assigned To => Juha Manninen
2015-10-27 19:00 Juha Manninen Status new => assigned
2015-10-27 23:16 Juha Manninen Fixed in Revision => r50187
2015-10-27 23:16 Juha Manninen LazTarget => -
2015-10-27 23:16 Juha Manninen Note Added: 0086926
2015-10-27 23:16 Juha Manninen Status assigned => resolved
2015-10-27 23:16 Juha Manninen Resolution open => fixed
2015-10-28 14:39 Zaher Dirkey Status resolved => closed