May 11

question: dualbutton css

Posted by Bryan Clark
Filed under mozilla, questions | 5 Comments

How do you make the dualbutton always appear like the last two sets of screenshots (as it does on hover)?

I’m looking to make dualbuttons always show their dropdown button with a real button like look.  This dualbutton reply button is  going to land in Thunderbird 3 soon and I’d like the style to look correct for both Linux and Windows (Mac is using its own button style).

dualbutton-dropdown-hover

However this doesn’t appear to be some kind of toolkit CSS hover issue. The windows CSS is decidedly worse than the Linux right now so that may be a separate issue all together; and if so we can attempt that in the same way we handled the Mac.

Hints, answers, and the like are greatly appreciated in the comments.

This entry was posted on Monday, May 11th, 2009 at 2:07 pm and is filed under mozilla, questions. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “question: dualbutton css”

  1. Neil Rashbrook on May 13th, 2009 at 1:28 am

    Are you approaching this from the toolkit point of view (“I think toolkit has a bug that needs to be fixed”) or the Thunderbird point of view (“How do I hack around this toolkit behaviour”)?

  2. Malcolm Parsons on May 13th, 2009 at 6:10 am

    > (Mac is using it’s own button style)

    s/it’s/its/

  3. _FrnchFrgg_ on May 13th, 2009 at 2:07 pm

    In fact, to blend more in the gnome ui, we should make dropdown always appear as two separate buttons and not some kind of a button that overwrites part of the border of another (that’s the goal of https://bugzilla.mozilla.org/show_bug.cgi?id=409655, shame on me for not doing anything mozilla-related these past months).

    You probably want to use -moz-appearance: button for the two inner objects of the dropdown, and remove the special -moz-appearance that the dropdown probably has.

  4. Bryan Clark on May 13th, 2009 at 10:13 pm

    Neil: I’m looking at this from a “How can I hack around the toolkit behaviour” to get what I want. I’m not sure if I see this as a toolkit bug but I haven’t thought about it from that angle.

    @_FrnchFrgg_: thanks for the tip, I’ll try that out!

    - sorry comments weren’t working for a while, the captcha key went bad for some reason -

  5. Jim on July 18th, 2009 at 12:55 pm

    In addition to being wrong for Gnome as mentioned above, dualbuttons are wrong for Windows too. The Win32 version of a dualbutton, a “split button”, is a special kind of button that has a bar between the text and the arrow. It’s not a button within a button as you’d get with -moz-appearance:dualbutton-dropdown.

    The same thing applies to toolbar buttons (e.g. the “Get Mail” button in Thunderbird). It seems like this idea is fairly common across OS boundaries so maybe there should be a more straightforward way to handle it? I looked at the DOM for the new message buttons in Thunderbird 3 and it feels like it’s trying to work around buggy/missing features with -moz-appearance.

    MSDN has some information about the buttons here: http://msdn.microsoft.com/en-us/library/bb775947%28VS.85%29.aspx . Note that it’s a little misleading and split buttons are in XP as well.

Leave a Reply