# Label not properly centered in TextButton

I'm using LibGDX v1.1.0 and I see that the label of a TextButton is not properly centered. I have the following code:

m_resumeButton = new TextButton("resume", skin);
public void changed(ChangeEvent event, Actor actor) {
m_state = GameState.RUNNING;
getGame().getWorld().pauseWorld(false);
}
});


The default TextButtonStyle is defined as:

"com.badlogic.gdx.scenes.scene2d.ui.TextButton\$TextButtonStyle": {
"default": {
"font": "font24",
"fontColor": "white"
}
}


The menu button images are simple 240x48 bitmaps saved as 9-patch images. An image can be found here to illustrate the problem:

https://www.dropbox.com/s/cwuhu5xb9ro5w6m/screenshot001.jpg

Am I doing something wrong? Or is there a problem with the button images I'm using?

• Using a non 9-patch image doesn't make a difference. The label is still not centered properly. – Kees de Bruin Jun 10 '14 at 11:40

TextButton button = new TextButton(text, skin, styleId);