How to acchieve blue buttons in chamaleon segmented button bar?

Hi,

I’ve downloaded
chameleon
theme and start to prepare a
segmented button bar
following this structure:

Button btn1 = new Button(titButton1, this, "googleButtonClick");
 	btn1.addStyleName("first");

Button btn2 = new Button(titButton2);

Button btn3 = new Button(titButton3);
		 			 	
Button btn4 = new Button(titButton4, this, "logoutButtonClick");
 	btn4.addStyleName("last");		 	
		 	
layout = new HorizontalLayout();				
layout.addComponent(btn1);
layout.addComponent(btn2);		
layout.addComponent(btn3);
layout.addComponent(btn4);	
layout.setStyleName("segment");
layout.addStyleName("segment-alternate");

The problem is that clicked buttons doesn’t get showed in that
nice blue
; they still get showed in
dark grey
.

Could somebody tell me what I am doing wrong or what I am missing?

thanks
11762.png
11763.png

Problem solved:

I need to add “default” style to each button:

btn1.addStyleName("default");
...
btn4.addStyleName("default");

(‘view code’ button in the demo will be usefull)

Hi:

Do you know how to apply the small segment style?

regards,

Hugo

You just need to add the “small” style name to each button, that’s all.

But the alternate segment seems odd, you shouldn’t need to add the “default” style to the buttons.

got it…thnak you very much