From 772a178a6622cc39c16b8cf51da88daf5d3cbd9f Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Mon, 30 Mar 2020 12:24:51 +0300 Subject: [PATCH] Fixing sidebar buttons again --- ui/widgets/side_bar_button.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/widgets/side_bar_button.cpp b/ui/widgets/side_bar_button.cpp index 193d23a..78dc112 100644 --- a/ui/widgets/side_bar_button.cpp +++ b/ui/widgets/side_bar_button.cpp @@ -71,8 +71,7 @@ int SideBarButton::resizeGetHeight(int newWidth) { 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); + return result + text; } void SideBarButton::paintEvent(QPaintEvent *e) {