mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 11:52:58 +00:00
Fixed Info top bar title overlap with right-side buttons on long titles.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user