Fixed Info top bar title overlap with right-side buttons on long titles.

This commit is contained in:
23rd
2026-05-21 10:23:51 +03:00
committed by John Preston
parent dbb7d1890e
commit 1f7e1ca483
+8 -1
View File
@@ -393,10 +393,17 @@ void TopBar::updateDefaultControlsGeometry(int newWidth) {
const auto y = _subtitle
? _st.titleWithSubtitlePosition.y()
: _st.titlePosition.y();
const auto available = std::max(newWidth - right - x, 0);
_title->entity()->resizeToWidth(available);
_title->moveToLeft(x, y, newWidth);
if (_subtitle) {
const auto subtitleX = _back
? _st.back.width
: _st.subtitlePosition.x();
_subtitle->entity()->resizeToWidth(
std::max(newWidth - right - subtitleX, 0));
_subtitle->moveToLeft(
_back ? _st.back.width : _st.subtitlePosition.x(),
subtitleX,
_st.subtitlePosition.y(),
newWidth);
}