diff --git a/components/packagetabs/packagetabs_impl.pas b/components/packagetabs/packagetabs_impl.pas index 6aa4e47c6c..1307d0e7d7 100644 --- a/components/packagetabs/packagetabs_impl.pas +++ b/components/packagetabs/packagetabs_impl.pas @@ -62,8 +62,6 @@ type procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean); override; procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseEnter; override; - procedure MouseLeave; override; public constructor Create(aOwner: TComponent); override; public @@ -567,20 +565,6 @@ begin end; end; -procedure TGroupTabLabel.MouseEnter; -begin - inherited MouseEnter; - - Font.Style := Font.Style + [fsUnderline]; -end; - -procedure TGroupTabLabel.MouseLeave; -begin - inherited MouseLeave; - - Font.Style := Font.Style - [fsUnderline]; -end; - { TGroupItem } constructor TGroupItem.Create(AType: TGroupType; const ATitle: string; @@ -952,7 +936,10 @@ begin xBtn.PopupMenu := FTabButtonMenu; xBtn.Down := xEditor = xOldActive; if xBtn.Down then + begin xActBtn := xBtn; + xBtn.Font.Style := xBtn.Font.Style + [fsUnderline]; + end; xBtn.IsOtherFile := xPkgItem.&Type = gtOther; end; end; @@ -1007,10 +994,14 @@ begin begin xBtn := TPackageTabButton(FPanel.Controls[I]); xBtn.Down := xBtn.Editor = xActEditor; + xBtn.Font.Style := xBtn.Font.Style - [fsUnderline]; if xBtn.Editor = xActEditor then xActBtn := xBtn; end; + if xActBtn <> nil then + xActBtn.Font.Style := xActBtn.Font.Style + [fsUnderline]; + if (xActBtn<>nil) and (FPanel is TPackageTabScrollBox) then TPackageTabScrollBox(FPanel).ScrollInView(xActBtn);