Mod dialog layout fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user