This is a non-problem. You can very easily switch from ratio to fixed size by multiplying / dividing by the window size whenever it changes.
const sf::Vector2f barSize(... fixed size...);
on resize event
{
viewport.width = barSize.x / window.width;
viewport.height = barSize.y / window.height;
viewport.left = (1 - viewport.width) / 2;
viewport.top = 1 - viewport.height;
}
(disclaimer: untested inaccurate pseudo-code)