for draw button on ToolPanel used theme service if ToolBarStyle=tbsNative

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@577 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2008-09-29 12:11:20 +00:00
parent 4215ae70c6
commit d4e8ab5c27
2 changed files with 11 additions and 4 deletions

View File

@ -4,7 +4,8 @@
- Исправлена ошибка в TDBComboBox.EditingDone; если не присвоен DataSet
- Переработан код выравнивания кнопок на TToolPanel
+ Опубликовано свойство OnUTF8KeyPress;
+ Свойство ToolPanel.ToolBarStyle теперь может принимать значение tbsNative - для отрисовки кнопок используется
текущая тема
22.05.2008 - версия 2.0.0.136 (svn revision 100)
+ У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink
+ У объекта TRxCustomDBLookupCombo ускорена отрисовка данных

View File

@ -19,7 +19,7 @@ type
TToolbarItem = class;
TToolbarButtonStyle = (tbrButton, tbrCheck, tbrDropDown, tbrSeparator,
tbrDivider, tbrDropDownExtra);
TToolBarStyle = (tbsStandart, tbsWindowsXP);
TToolBarStyle = (tbsStandart, tbsWindowsXP, tbsNative);
TToolButtonAllign = (tbaNone, tbaLeft, tbaRignt);
TToolPanelOption = (tpFlatBtns, tpTransparentBtns, tpStretchBitmap,
@ -348,7 +348,9 @@ begin
inherited Paint;
UpdateState(false);
if not Assigned(Action) then exit;
if (not Assigned(Action)) or (TToolbarItems(FOwnerItem.Collection).FToolPanel.FToolBarStyle = tbsNative) then
exit;
PaintRect:=ClientRect;
if (Action is TCustomAction) and Assigned(FImageList) and
(TCustomAction(Action).ImageIndex>-1) and
@ -711,6 +713,9 @@ begin
ImgW:=ImgW + DropDownExtraBtnWidth;
end;
if aLeft < TToolPanel(Parent).BorderWidth then
aLeft:=TToolPanel(Parent).BorderWidth;
if FShowCaption then
begin
TextSize:=Canvas.TextExtent(Caption);
@ -735,6 +740,7 @@ begin
end;
// if IsDesignMode then
aTop:=TToolPanel(Parent).BorderWidth;
end;
inherited SetBounds(aLeft, aTop, aWidth, aHeight);
end;
@ -971,7 +977,7 @@ procedure TToolPanel.ReAlignToolBtn;
var
i, L:integer;
begin
L:=0;
L:=BorderWidth;
for i:=0 to FToolbarItems.Count - 1 do
begin
FToolbarItems[i].FButton.Left:=L;