feature request: maximum tab width

Asked by Jakub Klinkovský

I have one feature request: the option to set maximum length of tab text. I have many pdfs with very long name and it gets very chaotic when several of them are open and the full name is displayed in tab.

Question information

Language:
English Edit question
Status:
Solved
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Reichold
Solved:
Last query:
Last reply:
Revision history for this message
Best Adam Reichold (adamreichold) said :
#1

Hello Jakub,

We are currently using Qt's default method for elding text [1] which is supposed to shorten the tab title as necessary. But how this is done exactly is style dependent. As this is so, this is something I do not like to override by force, but rather you can try using modifying the Qt stylesheet used by qpdfview as basically being described in [2] and the manual page and with further information in [3] and especially [4]. I hope this helps you the make the program behave according to your needs.

Best regards, Adam.

P.S.: I suppose the question in the Arch User Repository is answered by this as well?

[1] https://qt-project.org/doc/qt-4.8/qtabbar.html#elideMode-prop

[2] https://lists.launchpad.net/qpdfview/msg00142.html

[3] https://qt-project.org/doc/qt-4.8/stylesheet.html

[4] https://qt-project.org/doc/qt-4.8/qtabbar.html

Revision history for this message
Jakub Klinkovský (kuba-klinkovsky) said :
#2

Hi,
I used this in ~/.config/qpdfview/qpdfview.conf:
styleSheet="QTabBar::tab { height: 28px; max-width: 180px; }"
Thanks for the hints, I was not aware of the possibility of modifying the stylesheet in qpdfview.conf.
Jakub

Revision history for this message
Jakub Klinkovský (kuba-klinkovsky) said :
#3

Thanks Adam Reichold, that solved my question.