Bug 169764 - Rendered style names placed ineffectively in their style preview box rectangles
Summary: Rendered style names placed ineffectively in their style preview box rectangles
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Style-Preview-Box
  Show dependency treegraph
 
Reported: 2025-11-30 20:34 UTC by Eyal Rozenberg
Modified: 2025-12-03 14:14 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Style preview box in LO 26.2 nightly, GTK3, in Dark mode (8.10 KB, image/png)
2025-11-30 20:34 UTC, Eyal Rozenberg
Details
OnlyOffice - styles expanded (47.39 KB, image/png)
2025-12-03 07:21 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2025-11-30 20:34:07 UTC
Created attachment 204349 [details]
Style preview box in LO 26.2 nightly, GTK3, in Dark mode

The style preview box renders style names, in the relevant styles, within rectangles, within the box, for the user to select. The rectangle for rendering the style name is not very large, and the style name may well exceed it if the style mandates a large font size. It stands to reason, therefore, that the placement of the style name within the rectangle will maximize the use of space: Either:

* Placing the rendered name's center in the rectangle center; or 
* Place the start of the style name very close to the starting edge of the rectangle. (Note I said start, note left edge; the style name may be in an RTL script like Arabic or Hebrew.)

but - that's not what happens. It seems that the the start of the style name is placed at a very generous distance away from the rectangle start, so that, typically, it reaches well beyond the corresponding point on the other side of the rectangle center. See attached (partial) screenshot.

Build:

Version: 26.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: cf56ab4c9e29cb076c3f986a75ade58d997cb43c
CPU threads: 4; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US

PS - Collabore Office 25.4.7.2 seems to suffer from the same issue.
Comment 1 Heiko Tietze 2025-12-03 07:21:33 UTC
Created attachment 204400 [details]
OnlyOffice - styles expanded

(In reply to Eyal Rozenberg from comment #0)
> ...the style name may well exceed it if the style mandates a large font size.
For sure there is a limit up to the size grows. Likewise it happens on the classic dropdown or the Stylist. Besides, less space to at the start is fine.

I wonder if we really need both, the styled form and the attribute-less name (Default Paragraph Style is not Default anymore). Could imagine an on/off option in the context menu.

The inner rectangles have no margin in my view (Qt) making the white bar with text merge with the one right-hand.

For comparison (not as prototype!) I attach the expanded styles picker from OnlyOffice under Linux.
Comment 2 Eyal Rozenberg 2025-12-03 14:14:40 UTC
(In reply to Heiko Tietze from comment #1)
> 
> I wonder if we really need both, the styled form and the attribute-less name
> (Default Paragraph Style is not Default anymore). Could imagine an on/off
> option in the context menu.

That comment would fit bug 169763.

This bug is only about the placement of the rendered style name within the rectangle - and it's just a bug rather than a design choice IMO.

> The inner rectangles have no margin in my view (Qt) making the white bar
> with text merge with the one right-hand.

Really? For me, with VCLs kf5 and qt6, there _is_ a margin between adjacent inner rectangles.