https://bugs.documentfoundation.org/show_bug.cgi?id=165507

--- Comment #16 from Shai Berger <[email protected]> ---
(In reply to Eyal Rozenberg from comment #15)
> (In reply to Shai Berger from comment #14)
> > I see two ways to handle this.
> > 
> > One is a boolean control which modifies the sense of the (existing)
> > alignment Left and Right buttons, to be direction-sensitive. When it's off,
> > things are like now; when it's on, the buttons choose Start or End according
> > to the direction of the paragraph. 
> 
> I would say that the suggested boolean control is a non-sequitur. I mean, of
> course it's technically feasible if we force an app to behave a certain way,
> but - that's not how LO toolbar buttons work, generally: A button
> corresponds to a(n UNO) command. We have 6 commands for the 6 kinds of
> alignment. Without breaking the the toolbar code with special-casing of
> these particular buttons, a button will only do one thing, which is trigger
> one of these 6 commands.

This can be easily solved by creating two new commands
(context-sensitive-align-left and context-sensitive-align-right), which these
buttons will always perform. These commands can look at some application state,
controlled by the boolean, and choose which of the relevant (other) four to
apply to each paragraph.

> 
> Also, even if this would not be technically inadvisable - it would still be
> meaningless, because a selection may have multiple paragraphs, with
> different directions.
> 

If the boolean is off, it's OK. If it's on, they would apply alignment to each
paragraph separately. This leaves us without a command "take this set of
paragraphs and align each according to its direction", granted.

> Finally, "things are like now" will not an acceptable default; and whatever
> is not the default - will be what almost-everybody users, since very few
> people play with advanced settings. 
> 

I think "on" should be the default on new documents. On existing documents,
according to the selection or the paragraph the user is in (this would handle
correctly old LO docs, new LO docs, and imported docs).

> If I focus on your "when it's on" suggestion - this needs to be "fleshed
> out" as a suggestion, by answering the questions I posed at the bottom of
> comment 4.
> 

Just to be clear: I'm assuming the "on" state in all of the below:

> * If we press the now-left-align button, then switch the direction, the 
> active button will switch to the new-right-button?

Yes (because the choice of active button is according to the style of the
selected paragraph)

> * Will the tooltips say 'Align Start' and 'Align End'? And change labels when 
> we switch directions?

No, they'll always say "Align Left" and "Align Right". The tooltip to educate
users is the toggle's tooltip.

> * What will we see when the user chooses 'Align Left', e.g. via Format > 
> Paragraph... or when opening a file which has that setting? i.e. will one of 
> the 4 buttons be pressed? Two? None?

Not sure about Format > Paragraph, it's a dialog and we can adapt it to cover
the options. However, the active buttons (including the toggle) can be chosen
according to selected/current paragraph. 

* What buttons will the UNO commands for Align-Left and Align-Right have? Same
look but without the switch on direction switch? Or something to distinguish
them from Align-Start and Align-End even when static?

Something to deter users from including them directly. They should be
essentially deprecated.

> > The other -- less elegant, but probably easier to do, and I thought of it
> > first, so I might as well record it here -- is to put the Start/End buttons
> > in a toolbar sub-menu (like the one for spacing). Then we only need to show
> > them with a specific paragraph as context, so we can pick the right icon;
> > and we're free to position them one above the other, so no need to switch
> > places.
> 
> So, for this alternative - are you suggesting the toolbar have the four
> buttons it has now, plus a kind of a menubutton? Or - just a menubutton
> always?

Four plus menu.

> 
> Also, I don't see why we would only need to show them "with a specific
> paragraph as context" - the selection could encompass multiple paragraphs.

I, indeed, neglected the case of multiple paragraphs being selected -- in both
suggestions -- because I was focusing on Jonathan's question about needing to
change UI in a uniform context. But I don't think that's a major issue. The
boolean in the first suggestion can be a "tri-state", and the icons in the menu
in the second suggestion could fall back to a default (e.g. according to
interface language).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to