Open ghost opened 8 years ago
This is because <button>
element is actually a container, and style is applied for it (in my case):
As you can see in the corners there is a purple background. If you want to change the style of the button you need to redefine it's appearance. Currently in the project it's done in Theme.gwt.xml
file for some components. Then you can refer to the default appearances/styles from neptune theme Css3ButtonCellAppearance
class. This is the blessed way to change style of the UI.
Vitalidze, thanks for your answer! I need to change style for some button which are in NavView class. Do you have any ideas about it?
You need to define a non-standard appearance for the button. Then you can set up a button to use that appearance. You can read about appearances here: https://docs.sencha.com/gxt-guides/3/concepts/appearance/Appearance_3.html
For example, I created CustomCss3ButtonAppearance which implement ButtonCellAppearance. So i change color, margins, padding how i need. But i can't understand how to add this "CustomCss3ButtonAppearance" to reports button
Also i tried to do something like this : http://stackoverflow.com/questions/10472098/styling-a-gwt-button-with-css (Second answer : Option 2: Selectively turning off theming for buttons)
For example, I created CustomCss3ButtonAppearance which implement ButtonCellAppearance. So i change color, margins, padding how i need. But i can't understand how to add this "CustomCss3ButtonAppearance" to reports button
You can manually create buttons with constructors. There is a signature with TextButtonCell
, and then you can specify your appearance in TextButtonCell
constructor. As an option you can define your own button class, which will have this appearance set by default. Then you should be able to use it in XML files.
Also i tried to do something like this : http://stackoverflow.com/questions/10472098/styling-a-gwt-button-with-css (Second answer : Option 2: Selectively turning off theming for buttons)
Project does not use GWT buttons. It mostly uses GXT components.
I want to change style of some buttons.
I try to do something like this in xml.
And i try to do something like this in java.
But it's not work. Can anybody help me?