You've already forked lazarus-ccr
tvplanit: Set version to 1.0.10 for next release.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6389 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -522,8 +522,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfrmNavBarEd.SetData(ADesigner: TComponentEditorDesigner; ABar: TVpNavBar);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if FBar <> nil then
|
||||
FBar.RemoveFreeNotification(self);
|
||||
@@ -573,6 +571,8 @@ procedure TfrmNavBarEd.lbImagesDrawItem(Control: TWinControl; Index: Integer;
|
||||
var
|
||||
x, y: Integer;
|
||||
begin
|
||||
Unused(Control);
|
||||
|
||||
if [odSelected, odFocused] * State <> [] then
|
||||
lbImages.Canvas.Brush.Color := clHighlight
|
||||
else
|
||||
@@ -634,7 +634,7 @@ begin
|
||||
ts.Wordbreak := false;
|
||||
x := Rect.Left + 2;
|
||||
y := (Rect.Top + Rect.Bottom - lb.Canvas.TextHeight('Tg')) div 2;
|
||||
lb.Canvas.TextRect(Rect, x, y, lb.Items[Index]);
|
||||
lb.Canvas.TextRect(Rect, x, y, lb.Items[Index], ts);
|
||||
end;
|
||||
|
||||
procedure TfrmNavBarEd.lbItemsClick(Sender: TObject);
|
||||
@@ -665,11 +665,11 @@ end;
|
||||
|
||||
procedure TfrmNavBarEd.btnItemUpClick(Sender: TObject);
|
||||
var
|
||||
SaveItemIndex : Integer;
|
||||
//SaveItemIndex : Integer;
|
||||
Item: TVpNavBtnItem;
|
||||
begin
|
||||
if (lbItems.ItemIndex > 0) then begin
|
||||
SaveItemIndex := lbItems.ItemIndex;
|
||||
//SaveItemIndex := lbItems.ItemIndex;
|
||||
Item := TVpNavBtnItem(lbItems.Items.Objects[lbItems.ItemIndex]);
|
||||
if Item.Index > 0 then
|
||||
Item.Index := Item.Index - 1;
|
||||
|
@@ -48,7 +48,7 @@ uses
|
||||
|
||||
const
|
||||
BuildTime = {$I %DATE%} + {$I %TIME}; //'09/13/2002 09:25 AM';
|
||||
VpVersionStr = 'v1.08'; {Visual PlanIt library version}
|
||||
VpVersionStr = 'v1.10'; {Visual PlanIt library version}
|
||||
VpProductName = 'Visual PlanIt';
|
||||
|
||||
BorderStyles : array[TBorderStyle] of LongInt =
|
||||
|
@@ -1023,6 +1023,7 @@ var
|
||||
bmp := TBitmap.Create;
|
||||
try
|
||||
bmp.Assign(ABitmap);
|
||||
bmp.Transparent := true;
|
||||
{$IFDEF FPC}
|
||||
RotateBitmap(Bmp, Angle);
|
||||
{$ENDIF}
|
||||
|
@@ -543,7 +543,7 @@ begin
|
||||
if FSize <> Value then begin
|
||||
if Value < 2 then
|
||||
Value := 2;
|
||||
if Value > 10 then
|
||||
if Integer(Value) > 10 then
|
||||
Value := 10;
|
||||
ResizeControl(FRows, FColumns, Value);
|
||||
end;
|
||||
|
@@ -305,12 +305,12 @@ type
|
||||
procedure WMSetCursor(var Msg: TLMSetCursor); message LM_SETCURSOR;
|
||||
{$IF LCL_FullVersion >= 1080000}
|
||||
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||
const AXProportion, AYProportion: Double);
|
||||
const AXProportion, AYProportion: Double); override;
|
||||
{$ENDIF}
|
||||
{$IF VP_LCL_SCALING = 2}
|
||||
procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double);
|
||||
procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override;
|
||||
{$ELSEIF VP_LCL_SCALING = 1}
|
||||
procedure ScaleFontsPPI(const AProportion: Double);
|
||||
procedure ScaleFontsPPI(const AProportion: Double); override;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
@@ -351,7 +351,7 @@ type
|
||||
property ImagesWidth: Integer read FImagesWidth write SetImagesWidth;
|
||||
property ItemFont: TFont read FItemFont write SetItemFont;
|
||||
property ItemSpacing: Integer read FItemSpacing write SetItemSpacing stored IsStoredItemSpacing;
|
||||
property PlaySounds: Boolean read FPlaySounds write FPlaySounds;
|
||||
property PlaySounds: Boolean read FPlaySounds write FPlaySounds default false;
|
||||
property ScrollDelta: Integer read FScrollDelta write SetScrollDelta default 2;
|
||||
property SelectedItem: Integer read FSelectedItem write FSelectedItem;
|
||||
property SelectedItemFont: TFont read FSelectedItemFont write SetSelectedItemFont;
|
||||
|
@@ -137,7 +137,7 @@ end;
|
||||
procedure TVpNavBarPainter.DrawActiveFolderItems(Canvas: TCanvas; var CurPos: Integer);
|
||||
const
|
||||
BUTTON_DISTANCE = 8;
|
||||
LARGE_ICON_OFFSET = 4;
|
||||
LARGE_ICON_TEXT_DISTANCE = 2;
|
||||
SMALL_ICON_TEXT_DISTANCE = 6;
|
||||
var
|
||||
folder: TVpNavFolder;
|
||||
@@ -146,8 +146,7 @@ var
|
||||
text: String;
|
||||
h: Integer;
|
||||
R: TRect;
|
||||
largeIconOffs: Integer;
|
||||
smallIconOffs: Integer;
|
||||
dx, dy: Integer;
|
||||
{$IFDEF LCL}
|
||||
{$IF LCL_FullVersion >= 1090000}
|
||||
imgres: TScaledImageListResolution;
|
||||
@@ -157,9 +156,15 @@ var
|
||||
{$ENDIF}
|
||||
begin
|
||||
folder := FNavBar.Folders[FActiveFolder];
|
||||
largeIconOffs := ScaleY(LARGE_ICON_OFFSET, DesignTimeDPI);
|
||||
smallIconOffs := ScaleX(SMALL_ICON_TEXT_DISTANCE, DesignTimeDPI);
|
||||
|
||||
// Distance between icon and text, for large icons vertically, for small icons
|
||||
// horizontally
|
||||
dy := ScaleY(LARGE_ICON_TEXT_DISTANCE, DesignTimeDPI);
|
||||
dx := ScaleX(SMALL_ICON_TEXT_DISTANCE, DesignTimeDPI);
|
||||
|
||||
{ If an image list is assigned then use the image size.
|
||||
If no image list is assinged then assume a 32 x 32 image size.
|
||||
The size of the small images is always half size of the large images. }
|
||||
if FImages <> nil then begin
|
||||
{$IFDEF LCL}{$IF LCL_FullVersion >= 1090000}
|
||||
with TVpNavBarOpener(FNavBar) do begin
|
||||
@@ -202,7 +207,7 @@ begin
|
||||
Canvas.Font := FItemFont;
|
||||
|
||||
item := Folder.Items[J];
|
||||
{ If the caption is empty at designtime then display the item's name instead }
|
||||
{ If the caption is empty at design time display the item's name instead }
|
||||
if (csDesigning in FNavBar.ComponentState) and (item.Caption = '') then
|
||||
text := item.Name
|
||||
else
|
||||
@@ -215,11 +220,11 @@ begin
|
||||
|
||||
{make the icon's bottom blend into the label's top}
|
||||
R := item.IconRect;
|
||||
inc(R.Bottom, largeIconOffs);
|
||||
inc(R.Bottom, dy);
|
||||
item.IconRect := R;
|
||||
CurPos := item.IconRect.Bottom;
|
||||
|
||||
{now, draw the text}
|
||||
{now draw the text}
|
||||
if not DrawItemText(Canvas, item, CurPos, text, true, h) then
|
||||
Continue;
|
||||
Inc(CurPos, FItemSpacing + h);
|
||||
@@ -231,10 +236,10 @@ begin
|
||||
|
||||
{make the icon's right blend into the label's left}
|
||||
R := item.IconRect;
|
||||
inc(R.Right, smallIconOffs);
|
||||
inc(R.Right, dx);
|
||||
item.IconRect := R;
|
||||
|
||||
{now, draw the text}
|
||||
{now draw the text}
|
||||
if not DrawItemText(Canvas, item, CurPos, text, false, h) then
|
||||
Continue;
|
||||
Inc(CurPos, FItemSpacing + h);
|
||||
@@ -628,19 +633,9 @@ var
|
||||
begin
|
||||
Result := false;
|
||||
|
||||
{ If an image list is assigned then use the image size.
|
||||
If no image list is assinged then assume a 32 x 32 image size. }
|
||||
dist := ScaleX(MARGIN, DesignTimeDPI);
|
||||
W := FLargeImagesSize + 2*dist;
|
||||
H := FLargeImagesSize + 2*dist;
|
||||
{
|
||||
if Assigned(FImages) then begin
|
||||
W := FImages.Width + 2*dist;
|
||||
H := FImages.Height + 2*dist;
|
||||
end else begin
|
||||
W := ScaleX(32, DesignTimeDPI);
|
||||
H := ScaleY(32, DesignTimeDPI);
|
||||
end;}
|
||||
|
||||
R.Top := CurPos;
|
||||
R.Bottom := CurPos + H;
|
||||
@@ -676,12 +671,10 @@ function TVpNavBarPainter.DrawSmallIcon(Canvas: TCanvas; AItem: TVpNavBtnItem;
|
||||
CurPos: Integer): Boolean;
|
||||
const
|
||||
DELTA = 8;
|
||||
MARGIN = 2;
|
||||
var
|
||||
lOffset: Integer;
|
||||
R: TRect;
|
||||
del: Integer;
|
||||
m: Integer;
|
||||
{$IFDEF LCL}{$IF LCL_FullVersion >= 1090000}
|
||||
imgres: TScaledImageListResolution;
|
||||
f: Double;
|
||||
@@ -695,7 +688,6 @@ begin
|
||||
{glyph is at the left}
|
||||
R.Top := CurPos;
|
||||
del := ScaleY(DELTA, DesignTimeDPI);
|
||||
m := ScaleX(MARGIN, DesignTimeDPI);
|
||||
lOffset := abs(Canvas.Font.Height) div 2;
|
||||
if lOffset > del then
|
||||
R.Top := R.Top + lOffset - del;
|
||||
|
Reference in New Issue
Block a user