diff --git a/Lib/D2007/UnitSwitcherD2007.bpl b/Lib/D2007/UnitSwitcherD2007.bpl index bca26b7..e5ba893 100644 Binary files a/Lib/D2007/UnitSwitcherD2007.bpl and b/Lib/D2007/UnitSwitcherD2007.bpl differ diff --git a/Source/BaseSwDialog.pas b/Source/BaseSwDialog.pas index 7051737..202deaa 100644 --- a/Source/BaseSwDialog.pas +++ b/Source/BaseSwDialog.pas @@ -29,12 +29,14 @@ uses type TBaseSwStyleVisitor = class(TInterfacedPersistent, IBaseSwVisitor) private + FBold: Boolean; FColor: TColor; FImageIndex: Integer; FOverlayIndex: Integer; protected procedure VisitItem(const AItem: TBaseSwItem); virtual; public + property Bold: Boolean read FBold write FBold; property Color: TColor read FColor write FColor; property ImageIndex: Integer read FImageIndex write FImageIndex; property OverlayIndex: Integer read FOverlayIndex write FOverlayIndex; @@ -146,6 +148,7 @@ const { TBaseSwStyleVisitor } procedure TBaseSwStyleVisitor.VisitItem(const AItem: TBaseSwItem); begin + Bold := False; Color := clDefault; ImageIndex := -1; OverlayIndex := -1; @@ -631,6 +634,11 @@ begin end; Canvas.FillRect(Rect); + if FStyleVisitor.Bold then + Canvas.Font.Style := [fsBold] + else + Canvas.Font.Style := []; + textRect := Rect; InflateRect(textRect, -2, -2); diff --git a/Source/ProjSwClient.pas b/Source/ProjSwClient.pas index b8a9758..e4f0908 100644 --- a/Source/ProjSwClient.pas +++ b/Source/ProjSwClient.pas @@ -98,9 +98,9 @@ begin for projectIndex := Pred(moduleServices.MainProjectGroup.ProjectCount) downto 0 do begin project := moduleServices.MainProjectGroup.Projects[projectIndex]; - projectItem := TProjSwProject.Create(project); + projectItem := TProjSwProject.Create(project, project = activeProject); - if project = activeProject then + if projectItem.IsActive then activeItem := projectItem; projectList.Add(projectItem); diff --git a/Source/ProjSwDialog.dfm b/Source/ProjSwDialog.dfm index ab2e995..51d5480 100644 --- a/Source/ProjSwDialog.dfm +++ b/Source/ProjSwDialog.dfm @@ -1,6 +1,6 @@ inherited frmProjSwDialog: TfrmProjSwDialog Caption = 'ProjectSwitcher' - ExplicitHeight = 425 + ExplicitHeight = 427 PixelsPerInch = 96 TextHeight = 13 inherited pnlMain: TPanel @@ -21,7 +21,7 @@ inherited frmProjSwDialog: TfrmProjSwDialog end inherited ilsTypes: TImageList Bitmap = { - 494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010101000400080010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000001000000001002000000000000010 000000000000000000000000000000000000000000000000000000000000A5A5 A500636363006363630063636300636363006363630063636300A5A5A5000000 diff --git a/Source/ProjSwDialog.pas b/Source/ProjSwDialog.pas index 0d740e4..4fc45d8 100644 --- a/Source/ProjSwDialog.pas +++ b/Source/ProjSwDialog.pas @@ -57,6 +57,9 @@ uses procedure TProjSwStyleVisitor.VisitItem(const AItem: TBaseSwItem); begin ImageIndex := 0; + + if AItem is TProjSwProject then + Bold := TProjSwProject(AItem).IsActive; end; diff --git a/Source/ProjSwObjects.pas b/Source/ProjSwObjects.pas index ed54341..759f686 100644 --- a/Source/ProjSwObjects.pas +++ b/Source/ProjSwObjects.pas @@ -10,14 +10,17 @@ uses type TProjSwProject = class(TBaseSwItem) private + FIsActive: Boolean; FProject: IOTAProject; FName: String; protected function GetName: String; override; public - constructor Create(AProject: IOTAProject); + constructor Create(AProject: IOTAProject; AIsActive: Boolean); procedure Activate(const AClearSelection: Boolean); + + property IsActive: Boolean read FIsActive; end; @@ -27,12 +30,13 @@ uses { TProjSwProject } -constructor TProjSwProject.Create(AProject: IOTAProject); +constructor TProjSwProject.Create(AProject: IOTAProject; AIsActive: Boolean); begin inherited Create; FProject := AProject; FName := ExtractFileName(FProject.ProjectOptions.TargetName); + FIsActive := AIsActive; end;