QupZilla / qupzilla

Cross-platform Qt web browser
http://www.qupzilla.com
GNU General Public License v3.0
1.11k stars 350 forks source link

Wrong height calculation for bookmarks toolbar #2561

Closed tsujan closed 6 years ago

tsujan commented 6 years ago

The BookmarksToolbar layout size is calculated correctly at the c-tor (exactly as in QToolBarLayout::updateMarginAndSpacing) but, in BookmarksToolbar::addItem, the widget height is set to the following fixed value, without taking the margins into account:

m_layout->spacing() * 2 + button->preferredHeight()

That could result in truncated icons/texts when, for example:

PM_ToolBarItemMargin = 5 PM_ToolBarFrameWidth = 5 PM_ToolBarItemSpacing = 2

Please note that the above values are set by the style plugin.