Mod dialog layout fixes

This commit is contained in:
Anuken
2021-06-04 09:48:31 -04:00
parent 1bbb52877f
commit 527856e1b0
2 changed files with 4 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ public class SearchBar{
parent.pane(table -> {
pane[0] = table;
rebuild.get("");
});
}).get().setScrollingDisabled(true, false);
return pane[0];
}
@@ -54,9 +54,6 @@ public class SearchBar{
/** Match a list item with the search query, case insensitive */
public static boolean matches(String query, String name){
if(name == null || name.isEmpty()){
return false;
}
return name.toLowerCase().contains(query);
return name != null && !name.isEmpty() && name.toLowerCase().contains(query);
}
}

View File

@@ -147,12 +147,11 @@ public class ModsDialog extends BaseDialog{
}
void setup(){
boolean squish = Core.graphics.isPortrait();
float h = 110f;
float w = squish ? 410f : 524f;
float w = Math.min(Core.graphics.getWidth() / 1.1f, 520f); //squish ? 410f : 524f;
cont.clear();
cont.defaults().width(squish ? 480 : 560f).pad(4);
cont.defaults().width(Math.min(Core.graphics.getWidth() / 1.2f, 520f)).pad(4);
cont.add("@mod.reloadrequired").visible(mods::requiresReload).center().get().setAlignment(Align.center);
cont.row();