Fix side bar button height with long text.
This commit is contained in:
parent
adcc2f28a5
commit
f497eac804
1 changed files with 3 additions and 1 deletions
|
|
@ -68,7 +68,9 @@ void SideBarButton::setIconOverride(
|
|||
|
||||
int SideBarButton::resizeGetHeight(int newWidth) {
|
||||
auto result = _st.minHeight;
|
||||
const auto text = _text.countHeight(newWidth - _st.textSkip * 2);
|
||||
const auto text = std::min(
|
||||
_text.countHeight(newWidth - _st.textSkip * 2),
|
||||
_st.style.font->height * kMaxLabelLines);
|
||||
const auto add = text - _st.style.font->height;
|
||||
return result + std::max(add, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue