I have this underline on my main website https://initiostar.co.uk/ and use a standard Xara button (two groups soft-grouped together).

I tried the simpler version keeping the button rectangles as a named colour (that way the page & pasteboard background can stay in sync). In my case, I also used (and use) a name for the left-justified text, "htmltext", to ensure that text-stays-as text (no blurring at higher resolutions).

https://initiostar.co.uk/demo/NavBarLine/index.htm === Nav Bar (1).xar. The Navabar underline matches the lenght of the label automatically and you could ungroup the Navbar and change the first and last line colour.

Gary