mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 20:40:40 +02:00
PackageTabs: Improve visibility of selected editor tab. Issue #41132, patch by Maxim Ganetsky.
(cherry picked from commit 930797ee74
)
This commit is contained in:
parent
191d5ff89f
commit
b148fd8cb1
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user