Bug 160287

Summary: In Tabbed NotebookBar toolbar, "Print directly (%s)" button label contains the printer name, which is too long (uses 25-30% of available screen width space)
Product: LibreOffice Reporter: Jeff Fortin Tam <nekohayo>
Component: UIAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: heiko.tietze, stephane.guillou
Priority: medium    
Version: 24.2.0.3 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107237    
Attachments: Screenshot
Screenshot on Ubuntu 22.04 + GNOME 42.9, gtk3 VCL plugin

Description Jeff Fortin Tam 2024-03-20 16:55:09 UTC
Created attachment 193213 [details]
Screenshot

See attached screenshot. In the tabbed toolbar UI mode, that button's label alone eats over a quarter of of my screen's width, preventing other toolbar sections/groups from showing.

As the tooltip already shows the full printer name, I would recommend that the button's label be constrained to only showing "Print Directly", leaving the " (%s)" part to the tooltip.

This is particularly problematic on Linux where CUPS constantly auto-renames printers to super long names like this; it is not even possible for the user to shorten the printer name.

---

Tested on:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2024-03-21 04:46:42 UTC
Created attachment 193220 [details]
Screenshot on Ubuntu 22.04 + GNOME 42.9, gtk3 VCL plugin

Reproduced in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 53c5d570cab036b23f4969b858a648c8f0c24f93
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

In my case (Ubuntu 22.04 + GNOME 42.9 + gtk3 VCL plugin), the button is cut off and looks bad.

Label on button should not show the printer name at all (or at least be ellipsis'ed).
Comment 2 Stéphane Guillou (stragu) 2024-03-21 04:48:00 UTC
Heiko, could this be an easyHack?
Comment 3 Heiko Tietze 2024-03-21 08:42:18 UTC
The Notebookbar UI variants take the label from the command string, and .uno:PrintDefault is amended at sfx2/source/view/viewsh.cxx SID_PRINTER_NAME.

The command itself is placed on many if not all toolbars but made not visible by default. I think adding the printer name makes a lot of sense. But perhaps only for the contextual label and the tooltip. It might be easyhackable but is beyond my skills.


Since we have a lot issues with labels on the Notebookbar, I suggested to introduce another label on commands for this UI variant. Wouldn't solve the trouble with Print Directly though.