Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 38322 - [Contributions] Drop-Down Menu Off Screen
Summary: [Contributions] Drop-Down Menu Off Screen
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 29227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-02 09:51 EDT by Cherie Wong CLA
Modified: 2005-06-22 21:34 EDT (History)
4 users (show)

See Also:


Attachments
In Search View, the drop down menu for "Previous Search" ends up off-screen (bottom right of picture) (33.87 KB, image/gif)
2003-06-02 09:57 EDT, Cherie Wong CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cherie Wong CLA 2003-06-02 09:51:44 EDT
"Previous Search Results" drop down goes off-screen when window maximized in
KDE.  This happens in Search View.
Comment 1 Cherie Wong CLA 2003-06-02 09:57:01 EDT
Created attachment 5026 [details]
In Search View, the drop down menu for "Previous Search" ends up off-screen (bottom right of picture)
Comment 2 Dani Megert CLA 2003-06-02 10:02:01 EDT
The search view uses standard Platform UI code to show that menu.
Comment 3 Veronika Irvine CLA 2003-07-10 09:36:29 EDT
Moving back to Platform UI.

The positioning of the menu is done by JFace.  I believe the code is in 
ActionContributionItem.handleWidgetSelection.  This code just positions the 
menu under the toolitem.  It does not consider whether the menu will be 
offscreen either to the right or below.:

} else if ((style & SWT.DROP_DOWN) != 0) {
	if (e.detail == 4) {	// on drop-down button
		if (action.getStyle() == IAction.AS_DROP_DOWN_MENU) {
			IMenuCreator mc = action.getMenuCreator();
			ToolItem ti = (ToolItem) item;
			// we create the menu as a sub-menu of "dummy" so that 
we can use
			// it in a cascading menu too.
			// If created on a SWT control we would get an SWT 
error...
			//Menu dummy= new Menu(ti.getParent());
			//Menu m= mc.getMenu(dummy);
			//dummy.dispose();
			if (mc != null) {
				Menu m= mc.getMenu(ti.getParent());
				if (m != null) {
					// position the menu below the drop 
down item
					Rectangle b = ti.getBounds();
					Point p = ti.getParent().toDisplay(new 
Point(b.x, b.y+b.height));
					m.setLocation(p.x, p.y);	// 
waiting for SWT 0.42
					m.setVisible(true);
					return;	// we don't fire the action
				}
			}
		}
	}
}
Comment 4 Douglas Pollock CLA 2004-02-19 22:41:08 EST
While this code has not changed, I do not see the visual effect described.  
Window is maximized, KDE 3.2, GTK 2.2.4, and Eclipse I20040219.  Do you still 
see the problem in a recent Eclipse 3.0 integration build? 
Comment 5 Cherie Wong CLA 2004-02-20 11:11:50 EST
Hi Douglas!  Unfortunately, I'm using M7's GTK (on KDE 3.0.5 though) and still have this problem. 
Comment 6 Billy Biggs CLA 2004-09-16 16:40:34 EDT
What version of GTK+ are you using?  I cannot reproduce this under GNOME 2.2 or
KDE 3.1, using either GTK+ 2.2.1 or GTK+ 2.4.9.  I wonder if this may have been
a limitation in the GTK+ 2.0.x series?
Comment 7 Douglas Pollock CLA 2004-11-01 12:43:35 EST
No response, closing as WORKSFORME.   Please re-open if you have more 
information. 
Comment 8 Cherie Wong CLA 2004-11-02 15:52:39 EST
Hello all,

My apologies for the lack of response as I've been away from the office :)  

Billy & Douglas, thanks for doing the checks!  This bug did happen a while ago
so it could possibly have been a version limitation or fixed indirectly since.  

Thanks for closing the bug! :)

Yours,
C.
Comment 9 Billy Biggs CLA 2005-06-22 21:34:49 EDT
*** Bug 29227 has been marked as a duplicate of this bug. ***