Reputation: 81
I'd like to use a Material Icon as a status icon in the title bar. The function addMaterialCommandToRightBar puts it on there but it looks and acts like a button. I tried doing it using addCommandToRightBar and styling it after the Title style but it still appears like a button and can be toggled. I'd like it more like a label and to be able to change it. My goal is to have a connection status icon I can change easily.
Upvotes: 1
Views: 37
Reputation: 81
Last minute thought resulted in the answer.
f.getToolbar().addCommandToRightBar("", FontImage.createMaterial(FontImage.MATERIAL_WARNING, f.getToolbar().getTitleComponent().getStyle()), null).setEnabled(false);
I was missing the setEnabled on the end. Without this it always have the border and button action.
Upvotes: 1