draw button in Toolbar with native style

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@858 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75 2009-06-22 17:58:57 +00:00
parent 98f42bc1d5
commit 90dba7a8e3
3 changed files with 10 additions and 9 deletions

View File

@ -19,6 +19,7 @@
+ Опубликова BorderSpacing в TRxLabel + Опубликова BorderSpacing в TRxLabel
+ Добавлен пример для использования автоматической сортировки в RxDBGrid + Добавлен пример для использования автоматической сортировки в RxDBGrid
- Исправлена сортировка при использовании TRxMemDataSet - Исправлена сортировка при использовании TRxMemDataSet
- Исправлена отрисова кнопки в ToolPanel при отрисовке с использованием текущей темы
22.05.2008 - версия 2.0.0.136 (svn revision 100) 22.05.2008 - версия 2.0.0.136 (svn revision 100)
+ У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink + У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink
+ У объекта TRxCustomDBLookupCombo ускорена отрисовка данных + У объекта TRxCustomDBLookupCombo ускорена отрисовка данных

View File

@ -2103,7 +2103,7 @@ begin
if S<>'' then if S<>'' then
FMultiLines.Add(S); FMultiLines.Add(S);
end; end;
if not (csLoading in Column.Grid.ComponentState) then if not (csLoading in Column.Grid.ComponentState) and Column.Grid.HandleAllocated then
TRxDBGrid(Column.Grid).CalcTitle; TRxDBGrid(Column.Grid).CalcTitle;
end; end;

View File

@ -48,7 +48,7 @@ type
FImageList:TImageList; FImageList:TImageList;
FImageListSelected:TImageList; FImageListSelected:TImageList;
FDropDownMenu:TPopupMenu; FDropDownMenu:TPopupMenu;
FShowCaption:boolean; // FShowCaption:boolean;
FToolbarButtonStyle:TToolbarButtonStyle; FToolbarButtonStyle:TToolbarButtonStyle;
FLastDrawFlagsA:integer; FLastDrawFlagsA:integer;
FAutoSize:boolean; FAutoSize:boolean;
@ -436,7 +436,7 @@ begin
ClientSize.cx:= PaintRect.Right - PaintRect.Left; ClientSize.cx:= PaintRect.Right - PaintRect.Left;
ClientSize.cy:= PaintRect.Bottom - PaintRect.Top; ClientSize.cy:= PaintRect.Bottom - PaintRect.Top;
if (Caption <> '') and FShowCaption then if (Caption <> '') and ShowCaption then
begin begin
TMP := Caption; TMP := Caption;
SIndex := DeleteAmpersands(TMP); SIndex := DeleteAmpersands(TMP);
@ -539,7 +539,7 @@ begin
else else
FImageList.Draw(Canvas, Offset.X, Offset.Y, TCustomAction(Action).ImageIndex, TCustomAction(Action).Enabled); FImageList.Draw(Canvas, Offset.X, Offset.Y, TCustomAction(Action).ImageIndex, TCustomAction(Action).Enabled);
end; end;
if (Caption <> '') and FShowCaption then if (Caption <> '') and ShowCaption then
begin begin
TXTStyle := Canvas.TextStyle; TXTStyle := Canvas.TextStyle;
TXTStyle.Opaque := False; TXTStyle.Opaque := False;
@ -717,7 +717,7 @@ begin
if aLeft < TToolPanel(Parent).BorderWidth then if aLeft < TToolPanel(Parent).BorderWidth then
aLeft:=TToolPanel(Parent).BorderWidth; aLeft:=TToolPanel(Parent).BorderWidth;
if FShowCaption then if ShowCaption then
begin begin
TextSize:=Canvas.TextExtent(Caption); TextSize:=Canvas.TextExtent(Caption);
if (Layout in [blGlyphLeft, blGlyphRight]) and Assigned(FImageList) then if (Layout in [blGlyphLeft, blGlyphRight]) and Assigned(FImageList) then
@ -1191,9 +1191,9 @@ end;
procedure TToolbarItem.SetShowCaption(const AValue: boolean); procedure TToolbarItem.SetShowCaption(const AValue: boolean);
begin begin
if FButton.FShowCaption<>AValue then if FButton.ShowCaption<>AValue then
begin begin
FButton.FShowCaption:=AValue; FButton.ShowCaption:=AValue;
FButton.UpdateSize; FButton.UpdateSize;
FButton.Invalidate; FButton.Invalidate;
end; end;
@ -1251,7 +1251,7 @@ end;
function TToolbarItem.GetShowCaption: boolean; function TToolbarItem.GetShowCaption: boolean;
begin begin
Result:=FButton.FShowCaption; Result:=FButton.ShowCaption;
end; end;
function TToolbarItem.GetTag: Longint; function TToolbarItem.GetTag: Longint;
@ -1324,7 +1324,7 @@ begin
FButton.FImageList:=TToolbarItems(ACollection).FToolPanel.ImageList; FButton.FImageList:=TToolbarItems(ACollection).FToolPanel.ImageList;
FButton.Flat:=tpFlatBtns in TToolbarItems(ACollection).FToolPanel.Options; FButton.Flat:=tpFlatBtns in TToolbarItems(ACollection).FToolPanel.Options;
FButton.Transparent:=tpTransparentBtns in TToolbarItems(ACollection).FToolPanel.Options; FButton.Transparent:=tpTransparentBtns in TToolbarItems(ACollection).FToolPanel.Options;
FButton.FShowCaption:=false; FButton.ShowCaption:=false;
FButton.FAutoSize:=true; FButton.FAutoSize:=true;
FButton.FOwnerItem:=Self; FButton.FOwnerItem:=Self;
FButton.FFullPush:=true; FButton.FFullPush:=true;