0

我在 Neon 版本 M5 中有自定义颜色的按钮,如下所示:

public class MyButton extends AbstractLinkButton {


    @Override
    protected String getConfiguredForegroundColor() {

      return "00B200";
    }

    ....
}

现在当我更新到 M6 时,我的所有按钮都是黑色的。 现在按钮 按钮前

这是一个错误吗?我没有找到任何设置按钮颜色的替代方法...

4

1 回答 1

0

是的,这是一个错误,它将在 RC2 中修复。

而不是使用getConfiguredForegroundColor你可以使用getConfiguredCssClass. 这为您提供了更多样式的可能性,例如设置活动或悬停颜色。您可以使用 colors.css 中定义的调色板中的颜色。

有关示例,请参见以下链接:

https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/blob/releases/6.0.x/code/widgets/org.eclipse.scout.widgets.client/src/主/java/org/eclipse/scout/widgets/client/ui/forms/ButtonForm.java

https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/blob/releases/6.0.x/code/widgets/org.eclipse.scout.widgets.ui.html/ src/main/js/widgets/forms/ButtonForm.css

于 2016-05-19T12:07:39.333 回答