[Option][GUI] Folder options

This commit is contained in:
Eric Kotato 2022-09-15 23:22:40 +03:00 committed by Ilya Fedin
parent b540beff07
commit 0457f567ff

View file

@ -103,8 +103,7 @@ int SideBarButton::resizeGetHeight(int newWidth) {
const auto text = std::min( const auto text = std::min(
_text.countHeight(newWidth - _st.textSkip * 2), _text.countHeight(newWidth - _st.textSkip * 2),
_st.style.font->height * kMaxLabelLines); _st.style.font->height * kMaxLabelLines);
const auto add = text - _st.style.font->height; return result + text;
return result + std::max(add, 0);
} }
void SideBarButton::paintEvent(QPaintEvent *e) { void SideBarButton::paintEvent(QPaintEvent *e) {