开发者

GXT Shortcut Icon Alignment

开发者 https://www.devze.com 2023-03-18 19:20 出处:网络
I a开发者_C百科m trying to align my shortcut icon in the center.However, I have not found a way to do it yet.Below is my code:

I a开发者_C百科m trying to align my shortcut icon in the center. However, I have not found a way to do it yet. Below is my code:

    Shortcut sh = new Shortcut();
    sh.setSize(String.valueOf(BUTTON_SIZE), String.valueOf(BUTTON_SIZE));
    sh.setText("Shortcut Name");
    sh.setIcon(ICONS.desktop());
    sh.setIconStyle("bottomPanelShortcut");  // (1) this does not work.
    mLeftToolbar.add(sh);

.bottomPanelShortcut { margin-left: auto; margin-right: auto; }

The issue is that without the (1) statement, it shows the desktop image, but not centered. If I include the (1) statement, then the image disappears.

Thank you for help!

Peter

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号