Mod dialog layout fixes
This commit is contained in:
@@ -40,7 +40,7 @@ public class SearchBar{
|
|||||||
parent.pane(table -> {
|
parent.pane(table -> {
|
||||||
pane[0] = table;
|
pane[0] = table;
|
||||||
rebuild.get("");
|
rebuild.get("");
|
||||||
});
|
}).get().setScrollingDisabled(true, false);
|
||||||
return pane[0];
|
return pane[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,9 +54,6 @@ public class SearchBar{
|
|||||||
|
|
||||||
/** Match a list item with the search query, case insensitive */
|
/** Match a list item with the search query, case insensitive */
|
||||||
public static boolean matches(String query, String name){
|
public static boolean matches(String query, String name){
|
||||||
if(name == null || name.isEmpty()){
|
return name != null && !name.isEmpty() && name.toLowerCase().contains(query);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return name.toLowerCase().contains(query);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,12 +147,11 @@ public class ModsDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setup(){
|
void setup(){
|
||||||
boolean squish = Core.graphics.isPortrait();
|
|
||||||
float h = 110f;
|
float h = 110f;
|
||||||
float w = squish ? 410f : 524f;
|
float w = Math.min(Core.graphics.getWidth() / 1.1f, 520f); //squish ? 410f : 524f;
|
||||||
|
|
||||||
cont.clear();
|
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.add("@mod.reloadrequired").visible(mods::requiresReload).center().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user