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 37403 - Metal L&F - wrong close button in window header
Summary: Metal L&F - wrong close button in window header
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC All
: P4 blocker (vote)
Assignee: David Simonek
URL:
Keywords: L&F
Depends on:
Blocks:
 
Reported: 2003-11-21 08:34 UTC by jrojcek
Modified: 2008-12-22 21:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
picture of view header taken from current build (1.98 KB, image/gif)
2003-12-05 13:36 UTC, David Simonek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jrojcek 2003-11-21 08:34:00 UTC
9) the close button in window header doesn't
correspond to the button from the spec

http://ui.netbeans.org/nonav/docs/ui/ws_issues/ws_issues-metal.html
Comment 1 David Simonek 2003-11-26 14:28:06 UTC
Prioritizing.
Comment 2 David Simonek 2003-11-26 17:41:36 UTC
fixed in main trunk.
Comment 3 jrojcek 2003-12-05 13:16:53 UTC
Dafe, another one pixel issue. Please, move the close button in window
header one pixel up, so that its top is aligned with the top of drag
texture. Thanks.
Comment 4 David Simonek 2003-12-05 13:34:57 UTC
It already *is* top aligned in current build, look at the assigned
picture.
Comment 5 David Simonek 2003-12-05 13:36:23 UTC
Created attachment 12436 [details]
picture of view header taken from current build
Comment 6 jrojcek 2003-12-05 15:04:27 UTC
So the issue seems to be OS specific. On my linux, a window header has
21 pixels height. In screenshot you attached it has only 20 pixels.
This difference is caused probably by font height declared by linux. I
suggest to modify the algorithm so that it still centers the close
button but moves it one pixel up, so that in default layout the
computation would be (15 pixels is the close icon height):

20/2 - 15/2 = 10 - 7 = 3
21/2 - 15/2 = 10 - 7 = 3

Or something like that ;-).
Comment 7 David Simonek 2003-12-08 09:49:23 UTC
Lowering priority (now it's really minor issue).
Comment 8 David Simonek 2003-12-08 09:56:33 UTC
Keep in mind that this issue is not fixable in general. Your algorithm
works accidentally for heights 20 and 21. But for 21 and 22, my
algorithm (22-15)/2 and (21-15)/2 will work instead.
Comment 9 David Simonek 2003-12-08 14:05:34 UTC
I changed centering algorithm to give needed values for default tab
sizes in Metal LF. Hope it's enough. Of course it will mean change of
close position for other LFs, but as there is no big drag texture to
align with in other LFs, I think it's OK.
cvs log:
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/BasicViewTabUI.java,v
 new revision: 1.6; previous revision: 1.5
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/tabcontrol/MetalViewTabUI.java,v
 new revision: 1.11; previous revision: 1.10
Comment 10 Marian Mirilovic 2004-03-17 16:20:02 UTC
verified in [nb 3.6 rc1](200403161736)