And now I’ve fixed both those bugs.
The off-by-one error was caused by an improper conversion of a QML ternary expression to C++, specifically in the code that handles off-by-one. No wonder it was, well, off by one.
And when made ultra skinny, I have made the code that handles resizing to not let the width or height drop to zero.