fix(plugin): prevent overflow — shrink stats, constrain button to 110px, hidden overflow

This commit is contained in:
2026-07-13 07:03:28 +08:00
parent 2a1943cf35
commit 9b38b17eb0
@@ -110,9 +110,9 @@ export default function LibraryAppPanel({ appId, title, hardwareSlug, baseUrl }:
return ( return (
<PanelSectionRow> <PanelSectionRow>
<div className={staticClasses.Text} style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: "8px", padding: "4px 16px", fontSize: "13px" }}> <div className={staticClasses.Text} style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: "8px", padding: "4px 0", fontSize: "13px", overflow: "hidden", maxWidth: "100%", boxSizing: "border-box" }}>
{/* Stats */} {/* Stats */}
<span style={{ flex: 1 }}> <span style={{ flex: "1 1 0", minWidth: 0, overflow: "hidden" }}>
{data.estFps ? ( {data.estFps ? (
<span style={{ display: "inline-flex", flexWrap: "wrap", gap: "4px 8px" }}> <span style={{ display: "inline-flex", flexWrap: "wrap", gap: "4px 8px" }}>
<span><strong>{data.estFps.avg}</strong> <span style={{ opacity: 0.4 }}>avg</span></span> <span><strong>{data.estFps.avg}</strong> <span style={{ opacity: 0.4 }}>avg</span></span>
@@ -130,8 +130,8 @@ export default function LibraryAppPanel({ appId, title, hardwareSlug, baseUrl }:
{detectedSlug ? detectedSlug : <span style={{ color: "#e0a030" }}> global</span>} {detectedSlug ? detectedSlug : <span style={{ color: "#e0a030" }}> global</span>}
</span> </span>
</span> </span>
{/* View Details — constrained width */} {/* View Details — compact, gamepad-navigable, constrained */}
<div style={{ flexShrink: 0, width: "130px" }}> <div style={{ flexShrink: 0, width: "110px", overflow: "hidden", boxSizing: "border-box" }}>
<DialogButtonPrimary onClick={() => openExternalUrl(gameUrl)}> <DialogButtonPrimary onClick={() => openExternalUrl(gameUrl)}>
View Details View Details
</DialogButtonPrimary> </DialogButtonPrimary>