Recent

Author Topic: How to shorten tab captions in IDE?  (Read 1804 times)

Cascade

  • New Member
  • *
  • Posts: 25
How to shorten tab captions in IDE?
« on: May 28, 2025, 04:59:10 pm »
I’m wondering if there’s an option to shorten or abbreviate the captions of the Project Inspector - Project Name [Build Type] tab, and also the FPDoc Editor - TComponent.MethodName - <NONE> tab in the IDE. Sometimes these tabs are wider than the area available to display them in, and their width prevents other tabs from showing up, which makes it hard to scroll through them and can slow down my workflow.

(Couple of screenshots attached)

I’ve found a sort of workaround by manually editing the UI string constants file and changing the text strings to a single emoji character. It looks pretty good visually, but the string constants revert whenever I update Lazarus.

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: How to shorten tab captions in IDE?
« Reply #1 on: May 29, 2025, 07:55:47 pm »
What version of Lazarus are you using? This has already been fixed for the Project Inspector in issue #39418 (and should probably be in Lazarus 4.0).

I haven't looked at the FPDoc window yet, but I might be able to do that for that too.

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: How to shorten tab captions in IDE?
« Reply #2 on: May 29, 2025, 08:01:24 pm »
I’ve found a sort of workaround by manually editing the UI string constants file and changing the text strings to a single emoji character. It looks pretty good visually, but the string constants revert whenever I update Lazarus.

By the way, the idea with tab icons is interesting. It's worth thinking about, maybe it will really be useful.

Cascade

  • New Member
  • *
  • Posts: 25
Re: How to shorten tab captions in IDE?
« Reply #3 on: June 11, 2025, 10:32:12 am »
Thank you - I'm using Lazarus 4.1 (Fixes branch installed via FPCUpDeluxe)

I'll double check the Project Inspector tab again with the original string in lazarusidestrconsts.pas ( lisProjInspProjectInspector = 'Project Inspector - %s'; ).  Having trouble building at the moment after Xcode Command Line Tools updated from 16.2 to version 16.4 during a recent OS update - I suspect it's this issue: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41570

Yes, I do like the look with icons - possibly could be an interesting IDE option.

For FPDoc, as an experiment I'm thinking of modifying the FPDoc pane on my Lazarus install so the control alignment changes if the pane is resized narrower than it is high (i.e. portrait vs landscape).  At the moment some of the FPDoc buttons are out of sight when docked.

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: How to shorten tab captions in IDE?
« Reply #4 on: June 12, 2025, 12:30:24 am »
The "lisProjInspProjectInspector" line was not changed, since it is still visible in the undocked state. It is hidden only when docked.

But yes, as far as I can see in the issue, the commit remained in trunk, and therefore will be released only in Lazarus 5.0. But you can apply the commit locally if you want (there is an "Options" button on the page to download the patch).

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: How to shorten tab captions in IDE?
« Reply #5 on: June 12, 2025, 12:32:45 am »
By the way, I looked at the FPDoc Editor, and I'm not sure if it's possible to just shorten the title. It contains "FPDoc Editor - <token> - <file>", which is not displayed anywhere else. It turns out that when docking, an additional panel with this information should appear. It's not difficult, but still, additional space should be found for it...

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: How to shorten tab captions in IDE?
« Reply #6 on: June 12, 2025, 04:15:09 am »
For FPDoc, as an experiment I'm thinking of modifying the FPDoc pane on my Lazarus install so the control alignment changes if the pane is resized narrower than it is high (i.e. portrait vs landscape).  At the moment some of the FPDoc buttons are out of sight when docked.

As far as I can see, only one or two buttons on the "Inherited" tab can actually become inaccessible due to the small width. I already managed to make a patch for this using "TFlowPanel".

Cascade

  • New Member
  • *
  • Posts: 25
Re: How to shorten tab captions in IDE?
« Reply #7 on: July 01, 2025, 02:39:04 pm »
That sounds good - TFlowPanel is very useful.  Wonder if it can do centring (a bit like html flex box justify-content:center) ?

By the way, I looked at the FPDoc Editor, and I'm not sure if it's possible to just shorten the title. It contains "FPDoc Editor - <token> - <file>", which is not displayed anywhere else. It turns out that when docking, an additional panel with this information should appear. It's not difficult, but still, additional space should be found for it...

Yes - perhaps a caption panel could appear at the top when docked?  The tab could then display a symbol (*) or light-bulb icon indicator to highlight when topic content is available.

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: How to shorten tab captions in IDE?
« Reply #8 on: July 02, 2025, 11:34:28 pm »
That sounds good - TFlowPanel is very useful.  Wonder if it can do centring (a bit like html flex box justify-content:center) ?

I don't know HTML/CSS, but as far as I looked at the example on the Internet, no.

Yes - perhaps a caption panel could appear at the top when docked?

I don't see any other options )

The tab could then display a symbol (*) or light-bulb icon indicator to highlight when topic content is available.

I think the panel in the window is enough. If the user needs documentation (viewing or editing), he will open the window anyway.

By the way, I noticed that the window tab title does not update when the tab is not selected (the window is not visible). I think this is correct, and it is worth saving.

 

TinyPortal © 2005-2018