This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243297 - Toolbar has wrong preferred height
Summary: Toolbar has wrong preferred height
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 16:16 UTC by wzberger
Modified: 2014-04-24 11:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Compared toolbar button height (21.01 KB, image/png)
2014-03-26 16:16 UTC, wzberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wzberger 2014-03-26 16:16:39 UTC
Created attachment 146332 [details]
Compared toolbar button height

The preferred toolbar height doesn't respect the toolbar insets. This leads to a smaller button height. The issue was introduced with NetBeans 7.3 - the relevant code is in org.openide.awt.ToolbarWithOverflow#getPreferredSize(). The insets are not respecte4d in the calculation of the height.

  height = Math.max( height, getOrientation() == HORIZONTAL ? comp.getPreferredSize().height : comp.getPreferredSize().width );

A possible quick fix is to replace the line above with the line below

  height = Math.max( height, (getOrientation() == HORIZONTAL ? comp.getPreferredSize().height : comp.getPreferredSize().width) + (insets == null ? 0 : insets.top + insets.bottom));

The bug is in NetBeans 7.3/7.4/8.0
Comment 1 Stanislav Aubrecht 2014-03-28 10:05:24 UTC
core-main b7700134e7d9
Comment 2 Quality Engineering 2014-03-30 02:19:49 UTC
Integrated into 'main-silver', will be available in build *201403300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b7700134e7d9
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #243297 - add insets to toolbar height
Comment 3 Stanislav Aubrecht 2014-04-22 12:26:26 UTC
transplanted to release80 branch as b4f5fa0d885c
Comment 4 Quality Engineering 2014-04-24 02:06:43 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/b4f5fa0d885c
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #243297 - add insets to toolbar height
Comment 5 Tomas Danek 2014-04-24 11:29:13 UTC
looks ok on my system with 8.0 + patch1