suwak ma zawsze domyślną szerokość

[AKTUALIZACJA] Zauważyłem, że nieważne () byłoby dobre, ale nic nie zmieniło! Wstawiłem więc całą opcję z tworzeniem tabeli i suwakiem + etykiety. Przycisk tylny to tylko przycisk tekstowy dodany na końcu tabeli. Wiem, że to długi kod, ale wydaje mi się, że jest potrzebny.

Stworzyłem suwak w ten sposób, ponieważ wiem, że minimalna szerokość tła jest używana dla szerokości suwaka:

public OptionScreen(MainClass game) {
    super(game);
    preference = new PreferencesHelper();
    font = this.getDefaultFont(25);
    this.table = new Table();
    if (Config.DEBUG)
        this.table.debug();

    // add volumenlabel
    LabelStyle style = new LabelStyle(font, Color.WHITE);
    volumenLabel = new Label(Config.VOLUMEN_LABLE, style);
    table.add(volumenLabel).colspan(2);
    table.row();
    // add slider
    Skin skin = new Skin();
    skin.add("sliderbackground",
            this.game.manager.get("data/sliderbackground.png"));
    skin.add("sliderknob", this.game.manager.get("data/sliderknob.png"));

    SliderStyle sliderStyle = new SliderStyle();
    sliderStyle.background = skin.getDrawable("sliderbackground");
    sliderStyle.background.setMinWidth(600f);
    sliderStyle.knob = skin.getDrawable("sliderknob");

    volumenSlider = new Slider(0f, 1f, 0.1f, false, sliderStyle);
    volumenSlider.setValue(preference.getVolumen()); // load current volumen
    volumenSlider.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {
            volumeValue.setText(String.format("%.01f",
                    volumenSlider.getValue()));
            // sett the preference
            preference.setVolumen(volumenSlider.getValue());
        }
    });
    // add volslider to stage
    table.add(volumenSlider);
    volumenLabel.invalidate();

    // table
    style = new LabelStyle(font, Color.WHITE);
    // set current volumen
    volumeValue = new Label(
            String.format("%.01f", volumenSlider.getValue()), style);
    volumenLabel.setAlignment(2);
    table.add(volumeValue).width(50f);
    table.row();

    initBackButton();

    // init table
    table.setPosition(Config.VIRTUAL_VIEW_WIDTH / 2,
            Config.VIRTUAL_VIEW_HEIGHT / 2 - Config.BLOCK_SIZE * 10);

    // add a nice fadeIn to the whole table :)
    table.setColor(0, 0, 0, 0f);
    table.addAction(Actions.fadeIn(2f)); // alpha fade
    table.addAction(Actions.moveTo(Config.VIRTUAL_VIEW_WIDTH / 2,
            Config.VIRTUAL_VIEW_HEIGHT / 2, 2f)); // move to center of the
                                                    // screen
    // add to stage
    this.stage.addActor(table);
}

Jest wewnątrz stołu bez szerokości lub tak dalej. Sprawdziłem już, czy szerokość jest ustawiona i czy obliczenie dla prefWidth suwaka zabiera moje 600.

Math.max(style.knob == null ? 0 : style.knob.getMinWidth(), style.background.getMinWidth())

jest to obliczenie szerokości suwaka wewnątrz klasy Slider. Jeśli to obliczę i zaloguję, dostanę 600.
Wszystko wydaje mi się słuszne, ale suwak jest mały, aby ustawić 600 i.
Tło i knobtextures są 24x24.
Mam nadzieję, że powiecie mi, co robię źle.

questionAnswers(2)

yourAnswerToTheQuestion