fix occasional miscolored buttons to remove or edit my offer

This commit is contained in:
woodser 2024-12-21 08:44:54 -05:00
parent 42ede83ca2
commit fdee044023

View file

@ -1069,39 +1069,39 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
return new TableCell<>() { return new TableCell<>() {
OfferFilterService.Result canTakeOfferResult = null; OfferFilterService.Result canTakeOfferResult = null;
final ImageView iconView = new ImageView();
final AutoTooltipButton button = new AutoTooltipButton();
{
button.setGraphic(iconView);
button.setGraphicTextGap(10);
button.setPrefWidth(10000);
}
final ImageView iconView2 = new ImageView();
final AutoTooltipButton button2 = new AutoTooltipButton();
{
button2.setGraphic(iconView2);
button2.setGraphicTextGap(10);
button2.setPrefWidth(10000);
}
final HBox hbox = new HBox();
{
hbox.setSpacing(8);
hbox.setAlignment(Pos.CENTER);
hbox.getChildren().add(button);
hbox.getChildren().add(button2);
HBox.setHgrow(button, Priority.ALWAYS);
HBox.setHgrow(button2, Priority.ALWAYS);
}
@Override @Override
public void updateItem(final OfferBookListItem item, boolean empty) { public void updateItem(final OfferBookListItem item, boolean empty) {
super.updateItem(item, empty); super.updateItem(item, empty);
final ImageView iconView = new ImageView();
final AutoTooltipButton button = new AutoTooltipButton();
{
button.setGraphic(iconView);
button.setGraphicTextGap(10);
button.setPrefWidth(10000);
}
final ImageView iconView2 = new ImageView();
final AutoTooltipButton button2 = new AutoTooltipButton();
{
button2.setGraphic(iconView2);
button2.setGraphicTextGap(10);
button2.setPrefWidth(10000);
}
final HBox hbox = new HBox();
{
hbox.setSpacing(8);
hbox.setAlignment(Pos.CENTER);
hbox.getChildren().add(button);
hbox.getChildren().add(button2);
HBox.setHgrow(button, Priority.ALWAYS);
HBox.setHgrow(button2, Priority.ALWAYS);
}
TableRow<OfferBookListItem> tableRow = getTableRow(); TableRow<OfferBookListItem> tableRow = getTableRow();
if (item != null && !empty) { if (item != null && !empty) {
Offer offer = item.getOffer(); Offer offer = item.getOffer();