Closed Bug 44684 Opened 26 years ago Closed 26 years ago

Alignment button should reflect current alignment

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: sfraser_bugs)

Details

(Keywords: polish, Whiteboard: [nsbeta3+][p:3])

Build ID: 2000070608 As it is right now, there seems to be no indication of the alignment that exists where the caret is (i.e. left, center, right or justified). Other text editors, like Microsoft Word, give this indication. I think a nice subtle indication would be to change the icon of the alignment button to reflect the alignment state. In other words, if the text was right-aligned where the caret was, the icon would change to the right-aligned icon that appears to the left of "Right" in the alignment dropdown. Right now, it seems the button always uses the center-aligned icon, which is a little confusing (to me, at least). This is kind of hard to explain...if I didn't do a good job, let me know and I'll try to clarify.
Joe will need to provide the code to display the information and Simon will need to hook up the backend. Assigning to Joe for now.
Assignee: beppe → jfrancis
Target Milestone: --- → M18
accepting boog
Status: NEW → ASSIGNED
the problem with this is the same as the one with paragraph styles: what do you do with a mixed selection? In paragraph style we say "(mixed format)". the alignment button is too small for anything like that. cc'ing beth and simon for suggestions.
hmm, that's a good point. MS Word 2K just deselects (de-depresses?) all of the alignment buttons if the user selects mixed alignments. This would mean that we'd have to show no image at all, which is likely a very bad idea...
I would suggest following Words convention and just show nothing selected, it is the pattern that many users will be familiar with already.
For the other buttons, we just key off the start of the selection; I think we can do the same for alignment. Joe, is there an API for 'GetCurrentAlignment' I can call to get status for the buttons? If not, you should keep this bug to implement one. I'll then hook up the buttons.
Status: ASSIGNED → NEW
ok. will do. It soulds like the GetCurrentAlignment is going to have to make some additional guarantees from the other "getters", though: when I return the bool saying the alignment is mixed I'll have to promise that the alignment I return is the first one encountered.
Status: NEW → ASSIGNED
setting to nasbeta3+ -- Joe I need to know the priority on this one
Keywords: nsbeta3, polish
Whiteboard: [nsbeta3+]
As per bug 47506, the alignment dropdown is now (apparently) being broken up into four separate icons.
setting alignment for beth...
Whiteboard: [nsbeta3+] → [nsbeta3+][p:3]
checked in the implementation for GetAlignment. Maybe it even works. assigning to Simon for ui work. Come yell at me if it doesn't work...
Assignee: jfrancis → sfraser
Status: ASSIGNED → NEW
Fixed
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
verified in 8/24 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.