Keep read-only cards aligned at the same compact size
This commit is contained in:
parent
61000857d0
commit
35d153b516
3 changed files with 9 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ final class MenuPolish {
|
||||||
.hub .card{width:13.875%;min-height:66.75px}.journal .card{width:23.25%;height:103.5px;min-height:51px;padding:6px}
|
.hub .card{width:13.875%;min-height:66.75px}.journal .card{width:23.25%;height:103.5px;min-height:51px;padding:6px}
|
||||||
.council .card{width:25.875%;height:103.5px;min-height:86.25px}.bank .card{width:18%;min-height:75px}
|
.council .card{width:25.875%;height:103.5px;min-height:86.25px}.bank .card{width:18%;min-height:75px}
|
||||||
.card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px;padding:1px;margin:0 auto 2px;border-radius:6px;box-shadow:none;text-shadow:none}
|
.card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px;padding:1px;margin:0 auto 2px;border-radius:6px;box-shadow:none;text-shadow:none}
|
||||||
.card .item-icon{width:20px;height:20px}.card h2{font-size:11.5px;line-height:1.15;height:26.45px;overflow:hidden;margin:0 0 2px}.card p{font-size:9.5px;line-height:1.2;max-height:22.8px;overflow:hidden;margin:1px 0}.card p+p{max-height:11.4px}.house-choices .card p{max-height:11.4px}.locked.card{height:auto}.locked.card p{max-height:none}
|
.card .item-icon{width:20px;height:20px}.card h2{font-size:11.5px;line-height:1.15;height:26.45px;overflow:hidden;margin:0 0 2px}.card p{font-size:9.5px;line-height:1.2;max-height:22.8px;overflow:hidden;margin:1px 0}.card p+p{max-height:11.4px}.house-choices .card p{max-height:11.4px}.locked.card{height:auto;min-height:103.5px}.locked.card p{max-height:none}
|
||||||
.house-choices .card{width:19.5%;height:78.75px;min-height:78.75px}.house-choices .card h2{font-size:11px}
|
.house-choices .card{width:19.5%;height:78.75px;min-height:78.75px}.house-choices .card h2{font-size:11px}
|
||||||
.house-choices .card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px}.house-choices .card .item-icon{width:20px;height:20px}
|
.house-choices .card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px}.house-choices .card .item-icon{width:20px;height:20px}
|
||||||
.constellation{height:auto;min-height:262.5px;display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:flex-start;align-content:flex-start;padding:12px 0 36px}
|
.constellation{height:auto;min-height:262.5px;display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:flex-start;align-content:flex-start;padding:12px 0 36px}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,13 @@ public class RendererVerification {
|
||||||
}
|
}
|
||||||
System.out.println(id+": parser clean; "+cards.size()+" action hitboxes; maxScroll="+frame.maxScroll()+"; render-and-hitbox-ms="+((System.nanoTime()-started)/1_000_000));
|
System.out.println(id+": parser clean; "+cards.size()+" action hitboxes; maxScroll="+frame.maxScroll()+"; render-and-hitbox-ms="+((System.nanoTime()-started)/1_000_000));
|
||||||
}
|
}
|
||||||
|
String readOnlyHtml=SuppliedDocument.html("hub","Status","",List.of(new Card(13,"Account status",List.of("Read only"),"paper",false)),List.of());
|
||||||
|
var readOnlyPage=Page.of(readOnlyHtml,dir.resolve("read-only.html"),loader);var readOnlyFrame=HtmlRenderer.render(readOnlyPage,1536,896,1.5,0,Selector.State.NONE);
|
||||||
|
int readOnlyMarker=readOnlyHtml.indexOf("/* compact-dune-cards */"),readOnlyEnd=readOnlyHtml.indexOf("</style>",readOnlyMarker);
|
||||||
|
var readOnlyBefore=Page.of(readOnlyHtml.substring(0,readOnlyMarker)+readOnlyHtml.substring(readOnlyEnd),dir.resolve("read-only-before.html"),loader);
|
||||||
|
var readOnlyOldFrame=HtmlRenderer.render(readOnlyBefore,1536,896,1.5,0,Selector.State.NONE);
|
||||||
|
var readOnlyBox=readOnlyFrame.boundsOf(readOnlyPage.document.selectFirst("main .card"));var readOnlyOldBox=readOnlyOldFrame.boundsOf(readOnlyBefore.document.selectFirst("main .card"));
|
||||||
|
if(Math.abs(readOnlyBox.getHeight()/readOnlyOldBox.getHeight()-.75)>.002 || !readOnlyPage.document.select("main [data-slot]").isEmpty())throw new AssertionError("Read-only card sizing or authority changed");
|
||||||
verifyNavigators(dir,loader);
|
verifyNavigators(dir,loader);
|
||||||
verifyHouseChoices(dir,loader);
|
verifyHouseChoices(dir,loader);
|
||||||
var actualIcon=Path.of("../network/resource-pack/central/overlay/assets/dunerealms/textures/item/equipment/legendary_mk14_axe.png");Path iconTarget=dir.resolve("pack/assets/dunerealms/textures/item/equipment/legendary_mk14_axe.png");Files.createDirectories(iconTarget.getParent());Files.copy(actualIcon,iconTarget,StandardCopyOption.REPLACE_EXISTING);
|
var actualIcon=Path.of("../network/resource-pack/central/overlay/assets/dunerealms/textures/item/equipment/legendary_mk14_axe.png");Path iconTarget=dir.resolve("pack/assets/dunerealms/textures/item/equipment/legendary_mk14_axe.png");Files.createDirectories(iconTarget.getParent());Files.copy(actualIcon,iconTarget,StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ final class MenuPolish {
|
||||||
.hub .card{width:13.875%;min-height:66.75px}.journal .card{width:23.25%;height:103.5px;min-height:51px;padding:6px}
|
.hub .card{width:13.875%;min-height:66.75px}.journal .card{width:23.25%;height:103.5px;min-height:51px;padding:6px}
|
||||||
.council .card{width:25.875%;height:103.5px;min-height:86.25px}.bank .card{width:18%;min-height:75px}
|
.council .card{width:25.875%;height:103.5px;min-height:86.25px}.bank .card{width:18%;min-height:75px}
|
||||||
.card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px;padding:1px;margin:0 auto 2px;border-radius:6px;box-shadow:none;text-shadow:none}
|
.card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px;padding:1px;margin:0 auto 2px;border-radius:6px;box-shadow:none;text-shadow:none}
|
||||||
.card .item-icon{width:20px;height:20px}.card h2{font-size:11.5px;line-height:1.15;height:26.45px;overflow:hidden;margin:0 0 2px}.card p{font-size:9.5px;line-height:1.2;max-height:22.8px;overflow:hidden;margin:1px 0}.card p+p{max-height:11.4px}.house-choices .card p{max-height:11.4px}.locked.card{height:auto}.locked.card p{max-height:none}
|
.card .item-icon{width:20px;height:20px}.card h2{font-size:11.5px;line-height:1.15;height:26.45px;overflow:hidden;margin:0 0 2px}.card p{font-size:9.5px;line-height:1.2;max-height:22.8px;overflow:hidden;margin:1px 0}.card p+p{max-height:11.4px}.house-choices .card p{max-height:11.4px}.locked.card{height:auto;min-height:103.5px}.locked.card p{max-height:none}
|
||||||
.house-choices .card{width:19.5%;height:78.75px;min-height:78.75px}.house-choices .card h2{font-size:11px}
|
.house-choices .card{width:19.5%;height:78.75px;min-height:78.75px}.house-choices .card h2{font-size:11px}
|
||||||
.house-choices .card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px}.house-choices .card .item-icon{width:20px;height:20px}
|
.house-choices .card .emblem{font-size:19.5px;width:24px;height:24px;line-height:20px}.house-choices .card .item-icon{width:20px;height:20px}
|
||||||
.constellation{height:auto;min-height:262.5px;display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:flex-start;align-content:flex-start;padding:12px 0 36px}
|
.constellation{height:auto;min-height:262.5px;display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:flex-start;align-content:flex-start;padding:12px 0 36px}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue

Staff