Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Latest 8.3p LGPL and titleStyle on buttons does not work

    The title style on buttons is only applied when also an icon is set. When the icon is not set, the title is not wrapped with the provided style at all (See example below).

    In the previous smartclient version it worked as expected, so any button title could be styled no matter if an icon was defined or not.

    Code:
    isc.IButton.create({
        title: "Button applying style",
        width: 150,
        titleStyle: "windowHeaderText",
        icon: "icons/16/find.png"
    });
    isc.IButton.create({
        title: "Button not applying style",
        width: 150,
        titleStyle: "windowHeaderText",
        left: 200
    });

    #2
    3.1 introduced CSS3 mode, which means the underlying type of button has changed from StretchImgButton (which supports a separate titleStyle) to just "Button" (which does not).

    You can disable CSS3 mode (see Skinning overview) but we would recommend updating your CSS instead.

    Comment


      #3
      Seems our example code was too simple :-).

      We were actually using a dynamic form containing several ButtonItem fields. The ButtonItem API and documentation (still) supports a titleStyle. In the past the given style was applied to the button prompt. Now it does nothing. Disabling CSS3 mode brings the title style back.
      We are using the title style to visualize application-specific button states programmatically, so we can't statically redefine all buttons in the CSS.
      Is there some way to get this functionality back without disabling CSS3 mode?

      Comment


        #4
        ButtonItem is the same as IButton - if the underlying button type is StretchImgButton, titleStyle is supported, otherwise it's not (for Button).

        What you could do, which is supported for both buttons, would be to call setBaseStyle() to switch to a different style series for the special application state you're trying to show visually. This would allow you to, for instance, retain the ability to brighten the title color on rollover as the default buttons generally do.

        Comment

        Working...
        X