mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 17:41:31 +02:00
ideintf: draw object inspect +/- signs using ThemeServices
git-svn-id: trunk@17230 -
This commit is contained in:
parent
0844e46b0c
commit
0f81182102
@ -2,7 +2,7 @@
|
||||
{
|
||||
*****************************************************************************
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@ -37,7 +37,7 @@ interface
|
||||
uses
|
||||
InterfaceBase, Forms, SysUtils, Buttons, Types, Classes, Graphics, GraphType,
|
||||
StdCtrls, LCLType, LCLIntf, LCLProc, Controls, ComCtrls, ExtCtrls, TypInfo,
|
||||
LMessages, LResources, LazConfigStorage, Menus, Dialogs,
|
||||
LMessages, LResources, LazConfigStorage, Menus, Dialogs, Themes,
|
||||
ObjInspStrConsts,
|
||||
PropEdits, GraphPropEdits, ListViewPropEdit, ImageListEditor,
|
||||
ComponentTreeView, ComponentEditors, IDEImagesIntf;
|
||||
@ -2321,19 +2321,18 @@ var
|
||||
Platform: TLCLPlatform;
|
||||
X, Y: Integer;
|
||||
|
||||
procedure DrawTreeIcon(x,y:integer;Plus:boolean);
|
||||
procedure DrawTreeIcon(X, Y: Integer; Minus: Boolean);
|
||||
const
|
||||
PlusMinusDetail: array[Boolean] of TThemedTreeview =
|
||||
(
|
||||
ttGlyphClosed,
|
||||
ttGlyphOpened
|
||||
);
|
||||
var
|
||||
Details: TThemedElementDetails;
|
||||
begin
|
||||
with Canvas do begin
|
||||
Brush.Color:=clWhite;
|
||||
Pen.Color:=clBlack;
|
||||
Rectangle(x,y,x+9,y+9);
|
||||
MoveTo(x+2,y+4);
|
||||
LineTo(x+7,y+4);
|
||||
if Plus then begin
|
||||
MoveTo(x+4,y+2);
|
||||
LineTo(x+4,y+7);
|
||||
end;
|
||||
end;
|
||||
Details := ThemeServices.GetElementDetails(PlusMinusDetail[Minus]);
|
||||
ThemeServices.DrawElement(Canvas.Handle, Details, Rect(X, Y, X + 9, Y + 9), nil);
|
||||
end;
|
||||
|
||||
// PaintRow
|
||||
@ -2389,7 +2388,7 @@ begin
|
||||
|
||||
// draw icon
|
||||
if CanExpandRow(CurRow) then
|
||||
DrawTreeIcon(IconX,IconY,not CurRow.Expanded);
|
||||
DrawTreeIcon(IconX, IconY, CurRow.Expanded);
|
||||
|
||||
// draw name
|
||||
OldFont:=Font;
|
||||
|
Loading…
Reference in New Issue
Block a user