GXT Shortcut Icon Alignment
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
精彩评论