Bug 391763 Tree column splitters are difficult to use r=elif sr=roc a=dbaron

This commit is contained in:
neil@parkwaycc.co.uk 2007-08-15 01:20:12 -07:00
parent 4789a6c0aa
commit 23534d6705

View File

@ -123,13 +123,13 @@ nsDisplayXULTreeColSplitterTarget::HitTest(nsDisplayListBuilder* aBuilder,
nsPoint aPt)
{
nsPoint pt = aPt - aBuilder->ToReferenceFrame(mFrame);
// If we are in either the first 2 pixels or the last 2 pixels, we're going to
// If we are in either the first 4 pixels or the last 4 pixels, we're going to
// do something really strange. Check for an adjacent splitter.
PRBool left = PR_FALSE;
PRBool right = PR_FALSE;
if (mFrame->GetSize().width - 60 < pt.x)
if (mFrame->GetSize().width - nsPresContext::CSSPixelsToAppUnits(4) <= pt.x)
right = PR_TRUE;
else if (60 > pt.x)
else if (nsPresContext::CSSPixelsToAppUnits(4) > pt.x)
left = PR_TRUE;
if (left || right) {