Layout would break for machines with >6 lights because the column count was hardcoded. Uncap the UI width and fix the rows count instead.
Lights with less than 4 characters of text weren't aligned right, now they are.
(_statusContainer = new GridContainer
{
Margin = new Thickness(8, 4),
- // TODO: automatically change columns count.
- Columns = 3
+ Rows = 2
})
}
}
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#525252ff")}
});
CloseButton.OnPressed += _ => Close();
- SetSize = new Vector2(320, 200);
+ SetHeight = 200;
+ MinWidth = 320;
}
public StatusLight(StatusLightData data, IResourceCache resourceCache)
{
+ HorizontalAlignment = HAlignment.Right;
+
var hsv = Color.ToHsv(data.Color);
hsv.Z /= 2;
var dimColor = Color.FromHsv(hsv);