Recent

Author Topic: Feature request/suggestion  (Read 1389 times)

440bx

  • Hero Member
  • *****
  • Posts: 5477
Feature request/suggestion
« on: May 15, 2025, 05:30:39 am »
Hello,

In the Source Editor Window Manager it is possible to alphabetically sort the list which, when dealing with a lot of windows, makes it much easier to locate a specific window.

Unfortunately, there doesn't seem to be a way to alphabetically sort the editor tabs/labels.  In the attachment, notice that the tabs are _not_ alphabetically sorted. 

That's the feature request/suggestion: provide a way to sort those tabs/labels to make it easier to locate the tab of a particular editing window.

Comments and questions welcome.
« Last Edit: May 15, 2025, 05:40:10 am by 440bx »
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

paweld

  • Hero Member
  • *****
  • Posts: 1422
Re: Feature request/suggestion
« Reply #1 on: May 15, 2025, 06:19:44 am »
Try the PackageTabs component - Lazarus menu:
Package > Install/Uninstall Packages ..., on the right side search for “packageTabs” and click Install selection and then Build IDE.
Best regards / Pozdrawiam
paweld

440bx

  • Hero Member
  • *****
  • Posts: 5477
Re: Feature request/suggestion
« Reply #2 on: May 15, 2025, 06:33:50 am »
Try the PackageTabs component - Lazarus menu:
Package > Install/Uninstall Packages ..., on the right side search for “packageTabs” and click Install selection and then Build IDE.
Paweld, thank you for the suggestion.

I installed the package and after installing it, I got what shows in the attachment.

My question is: is there a way to have all the tabs in a single line instead of occupying most of the editor screen ?

Thank you for your help.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

paweld

  • Hero Member
  • *****
  • Posts: 1422
Re: Feature request/suggestion
« Reply #3 on: May 15, 2025, 07:07:29 am »
Unfortunately, no. I use as a bar on the left side of the editor.
The component settings are available: Tools > Options > Editor > Pages and Windows
Best regards / Pozdrawiam
paweld

440bx

  • Hero Member
  • *****
  • Posts: 5477
Re: Feature request/suggestion
« Reply #4 on: May 15, 2025, 07:39:00 am »
Either way, it takes too much space for my taste but, it was definitely worth a try. 

Thank you for the suggestion @paweld
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

n7800

  • Sr. Member
  • ****
  • Posts: 362
Re: Feature request/suggestion
« Reply #5 on: May 15, 2025, 07:35:32 pm »
I installed the package and after installing it, I got what shows in the attachment.

My question is: is there a way to have all the tabs in a single line instead of occupying most of the editor screen ?

I took the liberty of opening a feature request on the bug tracker.

I listed some implementation options. Perhaps they will be considered.

440bx

  • Hero Member
  • *****
  • Posts: 5477
Re: Feature request/suggestion
« Reply #6 on: May 15, 2025, 07:58:33 pm »
I took the liberty of opening a feature request on the bug tracker.

I listed some implementation options. Perhaps they will be considered.
Thank you for doing that @n7800.  I wasn't even sure how to describe the problem/enhancement.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

wp

  • Hero Member
  • *****
  • Posts: 12871
Re: Feature request/suggestion
« Reply #7 on: May 17, 2025, 11:04:21 am »
Either way, it takes too much space for my taste [...]
Did you notice that there is a splitter at the side of the tab bar to adjust its width? For me personally the PackageTabs is one of most important additions to the Lazarus IDE that I always install. But it makes sense only at the left or right side of the editor - tree-like grouping by package is confusing in horizontal orientation of the tabs. Since monitors are rather wide nowadays there is more space at the side of the editor window than above/below it. Due to the vertical stacking a lot of tabs can be accomodated at the sides of the editor, and even a scrollbar becomes visibible if there are too many.
« Last Edit: May 17, 2025, 11:12:22 am by wp »

440bx

  • Hero Member
  • *****
  • Posts: 5477
Re: Feature request/suggestion
« Reply #8 on: May 17, 2025, 11:49:45 am »
Did you notice that there is a splitter at the side of the tab bar to adjust its width? For me personally the PackageTabs is one of most important additions to the Lazarus IDE that I always install.
Hello wp,

What you've got looks very nice.  Because of that, I thought I'd give the tabs package another shot.

Please refer to the attachment for what follows. I haven't been able to get something that looks like your setup.  Specifically, in yours the label text seems to be left justified.  In mine it looks centered which is not really good.  How do you get yours to be left justified ? 

If possible, I'd like to have all your tab settings because I like the result you posted a picture of.

Thank you!.

ETA:

Added the forgotten attachment.

PS: need to scroll horizontally to see the right hand side window.


« Last Edit: May 17, 2025, 12:11:21 pm by 440bx »
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

wp

  • Hero Member
  • *****
  • Posts: 12871
Re: Feature request/suggestion
« Reply #9 on: May 17, 2025, 12:19:03 pm »
I haven't been able to get something that looks like your setup.  Specifically, in yours the label text seems to be left justified.  In mine it looks centered which is not really good.  How do you get yours to be left justified ? 
There was a recent change in the PackageTabs to right-align the captions. If you don't use Laz/main make the following changes to file packagetabs_impl.pas in components/packagetabs of your Lazarus installation
  • Find the implementation of TPackageTabButton.Create, and add the following highlighted code after "inherited Create(aOwner)" to left-align the speedbutton captions
Code: Pascal  [Select][+][-]
  1. constructor TPackageTabButton.Create(aOwner: TComponent);
  2. begin
  3.   inherited Create(aOwner);
  4.  
  5.   if IDEEditorOptions.TabPosition in [tpLeft, tpRight] then
  6.   begin
  7.     Alignment := taLeftJustify;
  8.     Margin := Scale96ToFont(4); // need for left text align
  9.     BorderSpacing.Left := Scale96ToFont(8);
  10.     BorderSpacing.Right := 1;
  11.   end;
  12.  
  13.   Transparent := True;
  14. [...]
  • Further down in procedure TPackageTabPanel.RecreateToolBar, find the line "if FPanel is TPackageTabScrollBox then" and insert the instruction to set the Borderspacing to get a more pleasing display of the package names:
Code: Pascal  [Select][+][-]
  1. [...]
  2.         if FPanel is TPackageTabScrollBox then
  3.         begin
  4.           xLbl.Alignment := taLeftJustify;
  5.           xLbl.BorderSpacing.Left := FPanel.Scale96ToFont(4);
  6.         end
  7.         else if FPanel is TPackageTabFlowPanel then  
  8. [...]
« Last Edit: May 17, 2025, 12:26:29 pm by wp »

440bx

  • Hero Member
  • *****
  • Posts: 5477
Re: Feature request/suggestion
« Reply #10 on: May 17, 2025, 12:43:12 pm »
That worked great !!

Thank you WP.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

n7800

  • Sr. Member
  • ****
  • Posts: 362
Re: Feature request/suggestion
« Reply #11 on: May 18, 2025, 09:02:05 pm »
I haven't been able to get something that looks like your setup.  Specifically, in yours the label text seems to be left justified.  In mine it looks centered which is not really good.  How do you get yours to be left justified ? 

I can't help but brag that this is my fix ))

@wp, I just noticed that you added High-DPI support to it, thanks. Unfortunately, I only have one standard monitor, so I can't provide this support, since I won't be able to test it anyway.

440bx

  • Hero Member
  • *****
  • Posts: 5477
Re: Feature request/suggestion
« Reply #12 on: May 18, 2025, 10:15:56 pm »
I can't help but brag that this is my fix ))
Here is a heartfelt thank you and a well deserved compliment, well done!
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018