patch for horizintal scrolling bug by Theo
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@80 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
eca7e1c6e1
commit
2e22880921
@ -3163,9 +3163,15 @@ end;
|
||||
|
||||
procedure DrawTextW(Canvas: TCanvas; lpString: PWideChar; var lpRect: TRect; uFormat: Cardinal;
|
||||
AdjustRight: Boolean);
|
||||
var Style:TTextStyle;
|
||||
begin
|
||||
{$ifndef WINCE}
|
||||
{$ifdef LINUX}
|
||||
Style.Layout:=tlCenter;
|
||||
Canvas.TextRect(lpRect,lpRect.Left,lpRect.Top,lpString,Style); // theo 24.2.2007 Gibt sonst Striche auf GTK1
|
||||
{$else}
|
||||
DrawTextW(Canvas.Handle, lpString, Length(lpString), lpRect, uFormat, AdjustRight);
|
||||
{$endif}
|
||||
{$else}
|
||||
Canvas.TextOut(lpRect.Left,lpRect.Top,lpString);
|
||||
{$endif}
|
||||
@ -3868,8 +3874,14 @@ var
|
||||
I, Width, Height: Integer;
|
||||
|
||||
begin
|
||||
|
||||
{$IFDEF LINUX} //theo 24.2.2007
|
||||
Width:=14;
|
||||
Height:=14; {$message warn'nur um die exception zu verhindern. Werte nicht getestet'}
|
||||
{$ELSE}
|
||||
Width := GetSystemMetrics(SM_CXMENUCHECK) + 3;
|
||||
Height := GetSystemMetrics(SM_CYMENUCHECK) + 3;
|
||||
{$ENDIF}
|
||||
IL := TImageList.CreateSize(Width, Height);
|
||||
//with IL do
|
||||
// Handle := ImageList_Create(Width, Height, Flags, 0, AllocBy);
|
||||
@ -14623,6 +14635,8 @@ begin
|
||||
//todo:win GetUpdateRect(Handle, FUpdateRect, True);
|
||||
FUpdateRect := ClientRect;
|
||||
|
||||
OffsetRect(fUpdateRect,OffsetX,0); //theo 24.2.2007
|
||||
fUpdateRect.Right:=fUpdateRect.Right-fOffsetX*2; //theo 24.2.2007
|
||||
|
||||
inherited WMPaint(Message);
|
||||
|
||||
@ -19121,7 +19135,8 @@ begin
|
||||
end;
|
||||
// The clipping rectangle is given in client coordinates of the window. We have to convert it into
|
||||
// a sliding window of the tree image.
|
||||
OffsetRect(Window, -FEffectiveOffsetX, -FOffsetY);
|
||||
// OffsetRect(Window, -FEffectiveOffsetX, -FOffsetY); //theo 24.2.2007
|
||||
OffsetRect(Window, 0, -FOffsetY); //theo 24.2.2007
|
||||
PaintTree(Canvas, Window, Target, [poBackground, poColumnColor, poDrawFocusRect, poDrawDropMark, poDrawSelection,
|
||||
poGridLines]);
|
||||
end;
|
||||
@ -24317,6 +24332,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// Erase rest of window not covered by a node.
|
||||
if TargetRect.Top < MaximumBottom then
|
||||
begin
|
||||
@ -24325,6 +24342,7 @@ begin
|
||||
Target := TargetRect.TopLeft;
|
||||
R := Rect(TargetRect.Left, 0, TargetRect.Left, MaximumBottom - Target.Y);
|
||||
TargetRect := Rect(0, 0, MaximumRight - Target.X, MaximumBottom - Target.Y);
|
||||
OffsetRect(TargetRect,-OffsetX,0); //theo 24.2.2007
|
||||
// Avoid unnecessary copying of bitmap content. This will destroy the DC handle too.
|
||||
NodeBitmap.Height := 0;
|
||||
// NodeBitmap.PixelFormat := pf32Bit;
|
||||
|
@ -3,7 +3,7 @@ unit VirtualDrawTree;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes,Sysutils,Graphics,VirtualTrees;
|
||||
Classes,Sysutils,Graphics,virtualtrees;
|
||||
|
||||
type
|
||||
TVTDrawHintEvent = procedure(Sender: TBaseVirtualTree; HintCanvas: TCanvas; Node: PVirtualNode; R: TRect;
|
||||
|
@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, Types,SysUtils,StdCtrls,LMessages,Forms,LCLType,LCLProc,LCLIntf,
|
||||
Graphics,VirtualTrees,Controls;
|
||||
Graphics,virtualtrees,Controls;
|
||||
|
||||
|
||||
type
|
||||
@ -1039,7 +1039,7 @@ begin
|
||||
SetBkMode(Canvas.Handle, TRANSPARENT)
|
||||
else
|
||||
SetBkMode(Canvas.Handle, OPAQUE);
|
||||
DrawTextW(Canvas, PWideChar(xText), R, DrawFormat, False);
|
||||
DrawTextW(Canvas, PWideChar(xText), R, DrawFormat, False); //theo
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1087,7 +1087,7 @@ begin
|
||||
SetBkMode(Canvas.Handle, TRANSPARENT)
|
||||
else
|
||||
SetBkMode(Canvas.Handle, OPAQUE);
|
||||
DrawTextW(Canvas, PWideChar(xText),R, DrawFormat, False);
|
||||
DrawTextW(Canvas, PWideChar(xText),R, DrawFormat, False); //theo
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1606,7 +1606,7 @@ begin
|
||||
//b DrawFormat := DrawFormat or DT_RIGHT or DT_RTLREADING
|
||||
//b else
|
||||
DrawFormat := DrawFormat or DT_LEFT;
|
||||
DrawTextW(xCanvas, PWideChar(S), PaintInfo.CellRect, DrawFormat, False);
|
||||
DrawTextW(xCanvas, PWideChar(S), PaintInfo.CellRect, DrawFormat, False); //theo
|
||||
Result := PaintInfo.CellRect.Bottom - PaintInfo.CellRect.Top;
|
||||
end;
|
||||
end;
|
||||
@ -1730,7 +1730,7 @@ function TCustomVirtualStringTree.ContentToHTML(Source: TVSTTextSourceType; xCap
|
||||
|
||||
// Renders the current tree content (depending on Source) as HTML text encoded in UTF-8.
|
||||
// If Caption is not empty then it is used to create and fill the header for the table built here.
|
||||
// Based on ideas and code from Frank van den Bergh and Andreas Hörstemeier.
|
||||
// Based on ideas and code from Frank van den Bergh and Andreas H<EFBFBD>stemeier.
|
||||
|
||||
type
|
||||
UCS2 = Word;
|
||||
@ -2209,7 +2209,7 @@ end;
|
||||
function TCustomVirtualStringTree.ContentToRTF(Source: TVSTTextSourceType): string;
|
||||
|
||||
// Renders the current tree content (depending on Source) as RTF (rich text).
|
||||
// Based on ideas and code from Frank van den Bergh and Andreas Hörstemeier.
|
||||
// Based on ideas and code from Frank van den Bergh and Andreas H<EFBFBD>stemeier.
|
||||
|
||||
var
|
||||
Fonts: TStringList;
|
||||
|
@ -70,7 +70,7 @@ uses
|
||||
{$else}
|
||||
Menus,
|
||||
{$endif TNT}
|
||||
VirtualTrees;
|
||||
virtualtrees;
|
||||
|
||||
type
|
||||
TVTHeaderPopupOption = (
|
||||
|
@ -5,7 +5,7 @@ unit VTRegister;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes,SysUtils,VirtualTrees,VirtualStringTree,VirtualDrawTree,VTHeaderPopup;
|
||||
Classes,SysUtils,virtualtrees,virtualstringtree,virtualdrawtree,vtheaderpopup;
|
||||
|
||||
procedure Register;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user