how to scale GUI box without bearing a constant ratio among width and height?

hi,
i’m creating a energy meter. i’m using two GUI box components. The upper box need to scale down in size so that it revel the lower GUI box. so that it felt like a varying energy meter.
i need to scale scaling of height without altering width of box gui, how can i acure this?

i’m new to unity.

thanx in advance.

float yourWidth = 50.0f; // desired length of bar
GUI.Box(Rect(0,0,yourWidth,10.0f),“This is an energy bar”);