зеркало из https://github.com/mozilla/pjs.git
Fix for bugs:
121241 - Misplaced insertion line for outliner DND 120976 - Drop feedback needs some polishing r=pink, sr=hyatt Thanks for reviews and testing by zach. - added new atom "dragSession" - renamed atom "drop" to "dropOn" - added new pseudo class -moz-outliner-drop-feedback - added new paint method PaintDropFeedback() - drop feedback in between rows is now painted at the same position for both orientations.
This commit is contained in:
Родитель
33324c428b
Коммит
4e4cc8cea9
|
@ -109,7 +109,8 @@ XUL_ATOM(primary, "primary")
|
|||
XUL_ATOM(current, "current")
|
||||
XUL_ATOM(seltype, "seltype")
|
||||
XUL_ATOM(sorted, "sorted")
|
||||
XUL_ATOM(drop, "drop")
|
||||
XUL_ATOM(dragSession, "dragSession")
|
||||
XUL_ATOM(dropOn, "dropOn")
|
||||
XUL_ATOM(dropBefore, "dropBefore")
|
||||
XUL_ATOM(dropAfter, "dropAfter")
|
||||
XUL_ATOM(mozoutlinerrow, ":-moz-outliner-row")
|
||||
|
@ -121,6 +122,7 @@ XUL_ATOM(mozoutlinerindentation, ":-moz-outliner-indentation")
|
|||
XUL_ATOM(mozoutlinerline, ":-moz-outliner-line")
|
||||
XUL_ATOM(mozoutlinerimage, ":-moz-outliner-image")
|
||||
XUL_ATOM(mozoutlinerseparator, ":-moz-outliner-separator")
|
||||
XUL_ATOM(mozoutlinerdropfeedback, ":-moz-outliner-drop-feedback")
|
||||
|
||||
XUL_ATOM(menubar, "menubar") // An XP menu bar.
|
||||
XUL_ATOM(menu, "menu") // Represents an XP menu
|
||||
|
|
|
@ -1548,6 +1548,10 @@ nsOutlinerBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsOutlinerColumn* a
|
|||
if (sorted)
|
||||
mScratchArray->AppendElement(nsXULAtoms::sorted);
|
||||
|
||||
// drag session
|
||||
if (mDragSession)
|
||||
mScratchArray->AppendElement(nsXULAtoms::dragSession);
|
||||
|
||||
if (aRowIndex != -1) {
|
||||
nsCOMPtr<nsIOutlinerSelection> selection;
|
||||
mView->GetSelection(getter_AddRefs(selection));
|
||||
|
@ -1584,12 +1588,12 @@ nsOutlinerBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsOutlinerColumn* a
|
|||
mScratchArray->AppendElement(nsXULAtoms::leaf);
|
||||
}
|
||||
|
||||
// drop feedback
|
||||
// drop orientation
|
||||
if (mDropAllowed && mDropRow == aRowIndex) {
|
||||
if (mDropOrient == nsIOutlinerView::inDropBefore)
|
||||
mScratchArray->AppendElement(nsXULAtoms::dropBefore);
|
||||
else if (mDropOrient == nsIOutlinerView::inDropOn)
|
||||
mScratchArray->AppendElement(nsXULAtoms::drop);
|
||||
mScratchArray->AppendElement(nsXULAtoms::dropOn);
|
||||
else if (mDropOrient == nsIOutlinerView::inDropAfter)
|
||||
mScratchArray->AppendElement(nsXULAtoms::dropAfter);
|
||||
}
|
||||
|
@ -1922,6 +1926,9 @@ NS_IMETHODIMP nsOutlinerBodyFrame::Paint(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
if (mDropAllowed)
|
||||
PaintDropFeedback(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2070,9 +2077,8 @@ NS_IMETHODIMP nsOutlinerBodyFrame::PaintRow(int aRowIndex, const nsRect& aRowRec
|
|||
if (overflow > 0)
|
||||
cellRect.width -= overflow;
|
||||
nsRect dirtyRect;
|
||||
if (dirtyRect.IntersectRect(aDirtyRect, cellRect)) {
|
||||
if (dirtyRect.IntersectRect(aDirtyRect, cellRect))
|
||||
PaintCell(aRowIndex, currCol, cellRect, aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
}
|
||||
currX += currCol->GetWidth();
|
||||
}
|
||||
}
|
||||
|
@ -2653,6 +2659,123 @@ NS_IMETHODIMP nsOutlinerBodyFrame::PaintText(int aRowIndex,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBodyFrame::PaintDropFeedback(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer,
|
||||
PRUint32 aFlags)
|
||||
{
|
||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||
if (mDropOrient == nsIOutlinerView::inDropBefore ||
|
||||
mDropOrient == nsIOutlinerView::inDropAfter) {
|
||||
// Paint the drop feedback in between rows.
|
||||
|
||||
nsRect rowRect(mInnerBox.x, mInnerBox.y+mRowHeight*(mDropRow-mTopRowIndex), mInnerBox.width, mRowHeight);
|
||||
// Paint the drop feedback at the same position for both orientations.
|
||||
if (mDropOrient == nsIOutlinerView::inDropAfter)
|
||||
rowRect.y += mRowHeight;
|
||||
|
||||
nsRect dirtyRect;
|
||||
if (dirtyRect.IntersectRect(aDirtyRect, rowRect)) {
|
||||
// Find the primary cell.
|
||||
nscoord currX = rowRect.x;
|
||||
nsOutlinerColumn* currCol;
|
||||
for (currCol = mColumns; currCol && currX < mInnerBox.x+mInnerBox.width;
|
||||
currCol = currCol->GetNext()) {
|
||||
if (currCol->IsPrimary())
|
||||
break;
|
||||
currX += currCol->GetWidth();
|
||||
}
|
||||
PrefillPropertyArray(mDropRow, currCol);
|
||||
|
||||
// Resolve the style to use for the drop feedback.
|
||||
nsCOMPtr<nsIStyleContext> feedbackContext;
|
||||
GetPseudoStyleContext(nsXULAtoms::mozoutlinerdropfeedback, getter_AddRefs(feedbackContext));
|
||||
|
||||
const nsStyleVisibility* vis =
|
||||
(const nsStyleVisibility*)feedbackContext->GetStyleData(eStyleStruct_Visibility);
|
||||
|
||||
// Paint only if it is visible.
|
||||
if (vis->IsVisibleOrCollapsed()) {
|
||||
PRInt32 level;
|
||||
mView->GetLevel(mDropRow, &level);
|
||||
|
||||
// If our previous or next row has greater level use that for
|
||||
// correct visual indentation.
|
||||
if (mDropOrient == nsIOutlinerView::inDropBefore) {
|
||||
if (mDropRow > 0) {
|
||||
PRInt32 previousLevel;
|
||||
mView->GetLevel(mDropRow - 1, &previousLevel);
|
||||
if (previousLevel > level)
|
||||
level = previousLevel;
|
||||
}
|
||||
}
|
||||
else {
|
||||
PRInt32 rowCount;
|
||||
mView->GetRowCount(&rowCount);
|
||||
if (mDropRow < rowCount - 1) {
|
||||
PRInt32 nextLevel;
|
||||
mView->GetLevel(mDropRow + 1, &nextLevel);
|
||||
if (nextLevel > level)
|
||||
level = nextLevel;
|
||||
}
|
||||
}
|
||||
|
||||
currX += mIndentation * level;
|
||||
|
||||
nsCOMPtr<nsIStyleContext> twistyContext;
|
||||
GetPseudoStyleContext(nsXULAtoms::mozoutlinertwisty, getter_AddRefs(twistyContext));
|
||||
nsRect twistySize = GetImageSize(mDropRow, currCol->GetID().get(), twistyContext);
|
||||
const nsStyleMargin* twistyMarginData = (const nsStyleMargin*)twistyContext->GetStyleData(eStyleStruct_Margin);
|
||||
nsMargin twistyMargin;
|
||||
twistyMarginData->GetMargin(twistyMargin);
|
||||
twistySize.Inflate(twistyMargin);
|
||||
currX += twistySize.width;
|
||||
|
||||
const nsStylePosition* stylePosition = (const nsStylePosition*)
|
||||
feedbackContext->GetStyleData(eStyleStruct_Position);
|
||||
|
||||
// Obtain the width for the drop feedback or use default value.
|
||||
nscoord width;
|
||||
if (stylePosition->mWidth.GetUnit() == eStyleUnit_Coord)
|
||||
width = stylePosition->mWidth.GetCoordValue();
|
||||
else {
|
||||
// Use default width 50px.
|
||||
float p2t;
|
||||
mPresContext->GetPixelsToTwips(&p2t);
|
||||
width = NSIntPixelsToTwips(50, p2t);
|
||||
}
|
||||
|
||||
// Obtain the height for the drop feedback or use default value.
|
||||
nscoord height;
|
||||
if (stylePosition->mHeight.GetUnit() == eStyleUnit_Coord)
|
||||
height = stylePosition->mHeight.GetCoordValue();
|
||||
else {
|
||||
// Use default height 2px.
|
||||
float p2t;
|
||||
mPresContext->GetPixelsToTwips(&p2t);
|
||||
height = NSIntPixelsToTwips(2, p2t);
|
||||
}
|
||||
|
||||
// Obtain the margins for the drop feedback and then deflate our rect
|
||||
// by that amount.
|
||||
nsRect feedbackRect(currX, rowRect.y, width, height);
|
||||
const nsStyleMargin* styleMargin = (const nsStyleMargin*)
|
||||
feedbackContext->GetStyleData(eStyleStruct_Margin);
|
||||
nsMargin margin;
|
||||
styleMargin->GetMargin(margin);
|
||||
feedbackRect.Deflate(margin);
|
||||
|
||||
// Finally paint the drop feedback.
|
||||
PaintBackgroundLayer(feedbackContext, aPresContext, aRenderingContext, feedbackRect, aDirtyRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOutlinerBodyFrame::PaintBackgroundLayer(nsIStyleContext* aStyleContext, nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
@ -2705,6 +2828,18 @@ NS_IMETHODIMP nsOutlinerBodyFrame::ScrollToRow(PRInt32 aRow)
|
|||
ScrollInternal(aRow);
|
||||
UpdateScrollbar();
|
||||
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
// mac can't process the event loop during a drag, so if we're dragging,
|
||||
// grab the scroll widget and make it paint synchronously. This is
|
||||
// sorta slow (having to paint the entire tree), but it works.
|
||||
if ( mDragSession ) {
|
||||
nsCOMPtr<nsIWidget> scrollWidget;
|
||||
mScrollbar->GetWindow(mPresContext, getter_AddRefs(scrollWidget));
|
||||
if ( scrollWidget )
|
||||
scrollWidget->Invalidate(PR_TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2782,15 +2917,8 @@ nsOutlinerBodyFrame::ScrollInternal(PRInt32 aRow)
|
|||
PRInt32 absDelta = delta > 0 ? delta : -delta;
|
||||
if (hasBackground || absDelta*mRowHeight >= mRect.height)
|
||||
Invalidate();
|
||||
else if (mOutlinerWidget) {
|
||||
else if (mOutlinerWidget)
|
||||
mOutlinerWidget->Scroll(0, -delta*rowHeightAsPixels, nsnull);
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
// mac can't process the event loop during a drag, so if we're dragging,
|
||||
// update outliner widget synchronously.
|
||||
if (mDragSession)
|
||||
mOutlinerWidget->Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2987,7 +3115,7 @@ nsOutlinerBodyFrame::OnDragExit(nsIDOMEvent* aEvent)
|
|||
{
|
||||
if (mDropAllowed) {
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
else
|
||||
mDropAllowed = PR_FALSE;
|
||||
|
@ -3012,23 +3140,31 @@ nsOutlinerBodyFrame::OnDragExit(nsIDOMEvent* aEvent)
|
|||
NS_IMETHODIMP
|
||||
nsOutlinerBodyFrame::OnDragOver(nsIDOMEvent* aEvent)
|
||||
{
|
||||
// while we're here, handle tracking of scrolling during a drag.
|
||||
PRBool scrollUp = PR_FALSE;
|
||||
if (IsInDragScrollRegion(aEvent, &scrollUp)) {
|
||||
if (mDropAllowed) {
|
||||
// invalidate primary cell at old location.
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
}
|
||||
ScrollByLines(scrollUp ? -1 : 1);
|
||||
if (! mView)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// compute the row mouse is over and the above/below/on state. Below we'll use this
|
||||
// to see if anything changed.
|
||||
PRInt32 newRow = -1;
|
||||
PRInt16 newOrient = -1;
|
||||
ComputeDropPosition(aEvent, &newRow, &newOrient);
|
||||
|
||||
// While we're here, handle tracking of scrolling during a drag.
|
||||
PRInt32 rowCount;
|
||||
mView->GetRowCount(&rowCount);
|
||||
// Don't scroll if we are already at the top or bottom of the view.
|
||||
if (newRow > 0 && newRow < rowCount - 1) {
|
||||
PRBool scrollUp = PR_FALSE;
|
||||
if (IsInDragScrollRegion(aEvent, &scrollUp)) {
|
||||
if (mDropAllowed) {
|
||||
// invalidate primary cell at old location.
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
ScrollByLines(scrollUp ? -1 : 1);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// if changed from last time, invalidate primary cell at the old location and if allowed,
|
||||
// invalidate primary cell at the new location. If nothing changed, just bail.
|
||||
|
@ -3036,7 +3172,7 @@ nsOutlinerBodyFrame::OnDragOver(nsIDOMEvent* aEvent)
|
|||
// Invalidate row at the old location.
|
||||
if (mDropAllowed) {
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
|
||||
if (mOpenTimer) {
|
||||
|
@ -3077,7 +3213,7 @@ nsOutlinerBodyFrame::OnDragOver(nsIDOMEvent* aEvent)
|
|||
if (canDropAtNewLocation) {
|
||||
// Invalidate row at the new location/
|
||||
mDropAllowed = canDropAtNewLocation;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -316,6 +316,13 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer);
|
||||
|
||||
// This method paints a drop feedback in a given row of the outliner.
|
||||
NS_IMETHOD PaintDropFeedback(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer,
|
||||
PRUint32 aFlags = 0);
|
||||
|
||||
// This method is called with a specific style context and rect to
|
||||
// paint the background rect as if it were a full-blown frame.
|
||||
NS_IMETHOD PaintBackgroundLayer(nsIStyleContext* aStyleContext, nsIPresContext* aPresContext,
|
||||
|
|
|
@ -1548,6 +1548,10 @@ nsOutlinerBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsOutlinerColumn* a
|
|||
if (sorted)
|
||||
mScratchArray->AppendElement(nsXULAtoms::sorted);
|
||||
|
||||
// drag session
|
||||
if (mDragSession)
|
||||
mScratchArray->AppendElement(nsXULAtoms::dragSession);
|
||||
|
||||
if (aRowIndex != -1) {
|
||||
nsCOMPtr<nsIOutlinerSelection> selection;
|
||||
mView->GetSelection(getter_AddRefs(selection));
|
||||
|
@ -1584,12 +1588,12 @@ nsOutlinerBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsOutlinerColumn* a
|
|||
mScratchArray->AppendElement(nsXULAtoms::leaf);
|
||||
}
|
||||
|
||||
// drop feedback
|
||||
// drop orientation
|
||||
if (mDropAllowed && mDropRow == aRowIndex) {
|
||||
if (mDropOrient == nsIOutlinerView::inDropBefore)
|
||||
mScratchArray->AppendElement(nsXULAtoms::dropBefore);
|
||||
else if (mDropOrient == nsIOutlinerView::inDropOn)
|
||||
mScratchArray->AppendElement(nsXULAtoms::drop);
|
||||
mScratchArray->AppendElement(nsXULAtoms::dropOn);
|
||||
else if (mDropOrient == nsIOutlinerView::inDropAfter)
|
||||
mScratchArray->AppendElement(nsXULAtoms::dropAfter);
|
||||
}
|
||||
|
@ -1922,6 +1926,9 @@ NS_IMETHODIMP nsOutlinerBodyFrame::Paint(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
if (mDropAllowed)
|
||||
PaintDropFeedback(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2070,9 +2077,8 @@ NS_IMETHODIMP nsOutlinerBodyFrame::PaintRow(int aRowIndex, const nsRect& aRowRec
|
|||
if (overflow > 0)
|
||||
cellRect.width -= overflow;
|
||||
nsRect dirtyRect;
|
||||
if (dirtyRect.IntersectRect(aDirtyRect, cellRect)) {
|
||||
if (dirtyRect.IntersectRect(aDirtyRect, cellRect))
|
||||
PaintCell(aRowIndex, currCol, cellRect, aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
}
|
||||
currX += currCol->GetWidth();
|
||||
}
|
||||
}
|
||||
|
@ -2653,6 +2659,123 @@ NS_IMETHODIMP nsOutlinerBodyFrame::PaintText(int aRowIndex,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBodyFrame::PaintDropFeedback(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer,
|
||||
PRUint32 aFlags)
|
||||
{
|
||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||
if (mDropOrient == nsIOutlinerView::inDropBefore ||
|
||||
mDropOrient == nsIOutlinerView::inDropAfter) {
|
||||
// Paint the drop feedback in between rows.
|
||||
|
||||
nsRect rowRect(mInnerBox.x, mInnerBox.y+mRowHeight*(mDropRow-mTopRowIndex), mInnerBox.width, mRowHeight);
|
||||
// Paint the drop feedback at the same position for both orientations.
|
||||
if (mDropOrient == nsIOutlinerView::inDropAfter)
|
||||
rowRect.y += mRowHeight;
|
||||
|
||||
nsRect dirtyRect;
|
||||
if (dirtyRect.IntersectRect(aDirtyRect, rowRect)) {
|
||||
// Find the primary cell.
|
||||
nscoord currX = rowRect.x;
|
||||
nsOutlinerColumn* currCol;
|
||||
for (currCol = mColumns; currCol && currX < mInnerBox.x+mInnerBox.width;
|
||||
currCol = currCol->GetNext()) {
|
||||
if (currCol->IsPrimary())
|
||||
break;
|
||||
currX += currCol->GetWidth();
|
||||
}
|
||||
PrefillPropertyArray(mDropRow, currCol);
|
||||
|
||||
// Resolve the style to use for the drop feedback.
|
||||
nsCOMPtr<nsIStyleContext> feedbackContext;
|
||||
GetPseudoStyleContext(nsXULAtoms::mozoutlinerdropfeedback, getter_AddRefs(feedbackContext));
|
||||
|
||||
const nsStyleVisibility* vis =
|
||||
(const nsStyleVisibility*)feedbackContext->GetStyleData(eStyleStruct_Visibility);
|
||||
|
||||
// Paint only if it is visible.
|
||||
if (vis->IsVisibleOrCollapsed()) {
|
||||
PRInt32 level;
|
||||
mView->GetLevel(mDropRow, &level);
|
||||
|
||||
// If our previous or next row has greater level use that for
|
||||
// correct visual indentation.
|
||||
if (mDropOrient == nsIOutlinerView::inDropBefore) {
|
||||
if (mDropRow > 0) {
|
||||
PRInt32 previousLevel;
|
||||
mView->GetLevel(mDropRow - 1, &previousLevel);
|
||||
if (previousLevel > level)
|
||||
level = previousLevel;
|
||||
}
|
||||
}
|
||||
else {
|
||||
PRInt32 rowCount;
|
||||
mView->GetRowCount(&rowCount);
|
||||
if (mDropRow < rowCount - 1) {
|
||||
PRInt32 nextLevel;
|
||||
mView->GetLevel(mDropRow + 1, &nextLevel);
|
||||
if (nextLevel > level)
|
||||
level = nextLevel;
|
||||
}
|
||||
}
|
||||
|
||||
currX += mIndentation * level;
|
||||
|
||||
nsCOMPtr<nsIStyleContext> twistyContext;
|
||||
GetPseudoStyleContext(nsXULAtoms::mozoutlinertwisty, getter_AddRefs(twistyContext));
|
||||
nsRect twistySize = GetImageSize(mDropRow, currCol->GetID().get(), twistyContext);
|
||||
const nsStyleMargin* twistyMarginData = (const nsStyleMargin*)twistyContext->GetStyleData(eStyleStruct_Margin);
|
||||
nsMargin twistyMargin;
|
||||
twistyMarginData->GetMargin(twistyMargin);
|
||||
twistySize.Inflate(twistyMargin);
|
||||
currX += twistySize.width;
|
||||
|
||||
const nsStylePosition* stylePosition = (const nsStylePosition*)
|
||||
feedbackContext->GetStyleData(eStyleStruct_Position);
|
||||
|
||||
// Obtain the width for the drop feedback or use default value.
|
||||
nscoord width;
|
||||
if (stylePosition->mWidth.GetUnit() == eStyleUnit_Coord)
|
||||
width = stylePosition->mWidth.GetCoordValue();
|
||||
else {
|
||||
// Use default width 50px.
|
||||
float p2t;
|
||||
mPresContext->GetPixelsToTwips(&p2t);
|
||||
width = NSIntPixelsToTwips(50, p2t);
|
||||
}
|
||||
|
||||
// Obtain the height for the drop feedback or use default value.
|
||||
nscoord height;
|
||||
if (stylePosition->mHeight.GetUnit() == eStyleUnit_Coord)
|
||||
height = stylePosition->mHeight.GetCoordValue();
|
||||
else {
|
||||
// Use default height 2px.
|
||||
float p2t;
|
||||
mPresContext->GetPixelsToTwips(&p2t);
|
||||
height = NSIntPixelsToTwips(2, p2t);
|
||||
}
|
||||
|
||||
// Obtain the margins for the drop feedback and then deflate our rect
|
||||
// by that amount.
|
||||
nsRect feedbackRect(currX, rowRect.y, width, height);
|
||||
const nsStyleMargin* styleMargin = (const nsStyleMargin*)
|
||||
feedbackContext->GetStyleData(eStyleStruct_Margin);
|
||||
nsMargin margin;
|
||||
styleMargin->GetMargin(margin);
|
||||
feedbackRect.Deflate(margin);
|
||||
|
||||
// Finally paint the drop feedback.
|
||||
PaintBackgroundLayer(feedbackContext, aPresContext, aRenderingContext, feedbackRect, aDirtyRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOutlinerBodyFrame::PaintBackgroundLayer(nsIStyleContext* aStyleContext, nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
@ -2705,6 +2828,18 @@ NS_IMETHODIMP nsOutlinerBodyFrame::ScrollToRow(PRInt32 aRow)
|
|||
ScrollInternal(aRow);
|
||||
UpdateScrollbar();
|
||||
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
// mac can't process the event loop during a drag, so if we're dragging,
|
||||
// grab the scroll widget and make it paint synchronously. This is
|
||||
// sorta slow (having to paint the entire tree), but it works.
|
||||
if ( mDragSession ) {
|
||||
nsCOMPtr<nsIWidget> scrollWidget;
|
||||
mScrollbar->GetWindow(mPresContext, getter_AddRefs(scrollWidget));
|
||||
if ( scrollWidget )
|
||||
scrollWidget->Invalidate(PR_TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2782,15 +2917,8 @@ nsOutlinerBodyFrame::ScrollInternal(PRInt32 aRow)
|
|||
PRInt32 absDelta = delta > 0 ? delta : -delta;
|
||||
if (hasBackground || absDelta*mRowHeight >= mRect.height)
|
||||
Invalidate();
|
||||
else if (mOutlinerWidget) {
|
||||
else if (mOutlinerWidget)
|
||||
mOutlinerWidget->Scroll(0, -delta*rowHeightAsPixels, nsnull);
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
// mac can't process the event loop during a drag, so if we're dragging,
|
||||
// update outliner widget synchronously.
|
||||
if (mDragSession)
|
||||
mOutlinerWidget->Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2987,7 +3115,7 @@ nsOutlinerBodyFrame::OnDragExit(nsIDOMEvent* aEvent)
|
|||
{
|
||||
if (mDropAllowed) {
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
else
|
||||
mDropAllowed = PR_FALSE;
|
||||
|
@ -3012,23 +3140,31 @@ nsOutlinerBodyFrame::OnDragExit(nsIDOMEvent* aEvent)
|
|||
NS_IMETHODIMP
|
||||
nsOutlinerBodyFrame::OnDragOver(nsIDOMEvent* aEvent)
|
||||
{
|
||||
// while we're here, handle tracking of scrolling during a drag.
|
||||
PRBool scrollUp = PR_FALSE;
|
||||
if (IsInDragScrollRegion(aEvent, &scrollUp)) {
|
||||
if (mDropAllowed) {
|
||||
// invalidate primary cell at old location.
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
}
|
||||
ScrollByLines(scrollUp ? -1 : 1);
|
||||
if (! mView)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// compute the row mouse is over and the above/below/on state. Below we'll use this
|
||||
// to see if anything changed.
|
||||
PRInt32 newRow = -1;
|
||||
PRInt16 newOrient = -1;
|
||||
ComputeDropPosition(aEvent, &newRow, &newOrient);
|
||||
|
||||
// While we're here, handle tracking of scrolling during a drag.
|
||||
PRInt32 rowCount;
|
||||
mView->GetRowCount(&rowCount);
|
||||
// Don't scroll if we are already at the top or bottom of the view.
|
||||
if (newRow > 0 && newRow < rowCount - 1) {
|
||||
PRBool scrollUp = PR_FALSE;
|
||||
if (IsInDragScrollRegion(aEvent, &scrollUp)) {
|
||||
if (mDropAllowed) {
|
||||
// invalidate primary cell at old location.
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
ScrollByLines(scrollUp ? -1 : 1);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// if changed from last time, invalidate primary cell at the old location and if allowed,
|
||||
// invalidate primary cell at the new location. If nothing changed, just bail.
|
||||
|
@ -3036,7 +3172,7 @@ nsOutlinerBodyFrame::OnDragOver(nsIDOMEvent* aEvent)
|
|||
// Invalidate row at the old location.
|
||||
if (mDropAllowed) {
|
||||
mDropAllowed = PR_FALSE;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
|
||||
if (mOpenTimer) {
|
||||
|
@ -3077,7 +3213,7 @@ nsOutlinerBodyFrame::OnDragOver(nsIDOMEvent* aEvent)
|
|||
if (canDropAtNewLocation) {
|
||||
// Invalidate row at the new location/
|
||||
mDropAllowed = canDropAtNewLocation;
|
||||
InvalidatePrimaryCell(mDropRow);
|
||||
InvalidatePrimaryCell(mDropRow + (mDropOrient == nsIOutlinerView::inDropAfter ? 1 : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -316,6 +316,13 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer);
|
||||
|
||||
// This method paints a drop feedback in a given row of the outliner.
|
||||
NS_IMETHOD PaintDropFeedback(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer,
|
||||
PRUint32 aFlags = 0);
|
||||
|
||||
// This method is called with a specific style context and rect to
|
||||
// paint the background rect as if it were a full-blown frame.
|
||||
NS_IMETHOD PaintBackgroundLayer(nsIStyleContext* aStyleContext, nsIPresContext* aPresContext,
|
||||
|
|
|
@ -71,32 +71,6 @@ outlinerchildren:-moz-outliner-cell-text(selected, focus) {
|
|||
color: HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary) {
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, drop) {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, dropBefore) {
|
||||
border-top: 1px solid Highlight;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, primary, dropBefore) {
|
||||
border-top: 1px solid HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, dropAfter) {
|
||||
border-bottom: 1px solid Highlight;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, primary, dropAfter) {
|
||||
border-bottom: 1px solid HighlightText;
|
||||
}
|
||||
|
||||
|
||||
/* ::::: lines connecting cells ::::: */
|
||||
|
||||
|
@ -108,11 +82,34 @@ outlinerchildren:-moz-outliner-line {
|
|||
border: 1px dotted grey;
|
||||
}
|
||||
|
||||
|
||||
/* ::::: outliner separator ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-separator {
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
}
|
||||
|
||||
|
||||
/* ::::: drop feedback ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(dropOn) {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-drop-feedback {
|
||||
background-color: Highlight;
|
||||
width: 50px;
|
||||
height: 2px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-drop-feedback(selected) {
|
||||
background-color: HighlightText;
|
||||
}
|
||||
|
||||
|
||||
/* ::::: outliner columns ::::: */
|
||||
|
||||
outlinercol,
|
||||
|
|
|
@ -1,227 +0,0 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-2001 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
*/
|
||||
|
||||
/* ===== outliner.css ===================================================
|
||||
== Styles used by the XUL outline element.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: outliner ::::: */
|
||||
|
||||
outliner {
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
|
||||
-moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
|
||||
-moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
|
||||
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
|
||||
background-color: -moz-Field;
|
||||
color: -moz-FieldText;
|
||||
margin: 0px 4px 0px 4px;
|
||||
}
|
||||
|
||||
/* ::::: outliner rows ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-row {
|
||||
border: 1px solid transparent;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-row(selected) {
|
||||
background-color: -moz-Dialog;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-row(selected, focus) {
|
||||
background-color: Highlight;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-row(current, focus) {
|
||||
border: 1px dotted #F5DB95;
|
||||
}
|
||||
|
||||
/* ::::: outliner cells ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-cell {
|
||||
padding: 0px 2px 0px 2px;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected) {
|
||||
color: -moz-DialogText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, focus) {
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary) {
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, drop) {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, dropBefore) {
|
||||
border-top: 1px solid Highlight;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, primary, dropBefore) {
|
||||
border-top: 1px solid HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, dropAfter) {
|
||||
border-bottom: 1px solid Highlight;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, primary, dropAfter) {
|
||||
border-bottom: 1px solid HighlightText;
|
||||
}
|
||||
|
||||
|
||||
/* ::::: lines connecting cells ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-line {
|
||||
border: 1px dotted ThreeDShadow;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-line(selected, focus) {
|
||||
border: 1px dotted HighlightText;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-separator {
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
}
|
||||
|
||||
/* ::::: outliner columns ::::: */
|
||||
|
||||
outlinercol,
|
||||
outlinercolpicker {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: ThreeDHighlight ThreeDLightShadow;
|
||||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDHighlight ThreeDLightShadow;
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
padding: 0px 4px;
|
||||
}
|
||||
|
||||
.outlinercol-image {
|
||||
padding: 0px 1px;
|
||||
}
|
||||
|
||||
.outlinercol-text {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
/* ..... internal box ..... */
|
||||
|
||||
outlinercol:hover:active,
|
||||
outlinercolpicker:hover:active {
|
||||
border-top: 2px solid;
|
||||
border-right: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-left: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow -moz-Dialog;
|
||||
-moz-border-right-colors: ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDShadow -moz-Dialog;
|
||||
padding: 1px 4px 0px 5px;
|
||||
}
|
||||
|
||||
.outlinercol-image:hover:active {
|
||||
padding: 1px 1px 0px 2px;
|
||||
}
|
||||
|
||||
/* ::::: column drag and drop styles ::::: */
|
||||
|
||||
outlinercol[dragging="true"] {
|
||||
-moz-border-top-colors: ThreeDDarkShadow transparent !important;
|
||||
-moz-border-right-colors: ThreeDDarkShadow transparent!important;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow transparent !important;
|
||||
-moz-border-left-colors: ThreeDDarkShadow transparent !important;
|
||||
background-color: ThreeDShadow !important;
|
||||
color: ThreeDHighlight !important;
|
||||
}
|
||||
|
||||
outlinercol[insertafter="true"] {
|
||||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
}
|
||||
|
||||
outlinercol[insertbefore="true"] {
|
||||
-moz-border-left-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-column(insertbefore) {
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-column(insertafter) {
|
||||
border-right: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
/* ::::: sort direction indicator ::::: */
|
||||
|
||||
.outlinercol-sortdirection {
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
.sortDirectionIndicator[sortDirection="ascending"] > .outlinercol-sortdirection {
|
||||
list-style-image: url("chrome://global/skin/tree/sort-asc.gif");
|
||||
}
|
||||
|
||||
.sortDirectionIndicator[sortDirection="descending"] > .outlinercol-sortdirection {
|
||||
list-style-image: url("chrome://global/skin/tree/sort-dsc.gif");
|
||||
}
|
||||
|
||||
/* ::::: column picker ::::: */
|
||||
|
||||
.outliner-columnpicker-icon {
|
||||
list-style-image: url("chrome://global/skin/tree/columnpicker.gif");
|
||||
}
|
||||
|
||||
/* ::::: twisty ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-twisty {
|
||||
padding-right: 2px;
|
||||
width: 10px; /* The image's width is 10 pixels */
|
||||
list-style-image: url("chrome://global/skin/tree/twisty-clsd.gif");
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-twisty(open) {
|
||||
width: 10px; /* The image's width is 10 pixels */
|
||||
list-style-image: url("chrome://global/skin/tree/twisty-open.gif");
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-indentation {
|
||||
width: 16px;
|
||||
}
|
|
@ -1,246 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt <hewitt@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* ===== outliner.css ===================================================
|
||||
== Styles used by the XUL outline element.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: outliner ::::: */
|
||||
|
||||
outliner {
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: #BEC3D3 #5D616E;
|
||||
-moz-border-right-colors: #F8FAFE #5D616E;
|
||||
-moz-border-bottom-colors: #F8FAFE #5D616E;
|
||||
-moz-border-left-colors: #BEC3D3 #5D616E;
|
||||
background-color: #FFFFFF;
|
||||
color: #000000;
|
||||
margin: 0px 4px 0px 4px;
|
||||
}
|
||||
|
||||
outlinerchildren {
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
/* ::::: outliner rows ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-row {
|
||||
border: 1px solid transparent;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-row(selected) {
|
||||
background-color: #C7D0D9;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-row(selected, focus) {
|
||||
background-color: #424F63;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-row(current, focus) {
|
||||
border-top-color: #000000;
|
||||
border-bottom-color: #000000;
|
||||
}
|
||||
|
||||
/* ::::: outliner cells ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-cell {
|
||||
padding: 0px 2px 0px 2px;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected) {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, focus) {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary) {
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, drop) {
|
||||
background-color: #424F63;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, dropBefore) {
|
||||
border-top: 1px solid #424F63;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, primary, dropBefore) {
|
||||
border-top: 1px solid #FFFFFF;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(primary, dropAfter) {
|
||||
border-bottom: 1px solid #424F63;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-cell-text(selected, primary, dropAfter) {
|
||||
border-bottom: 1px solid #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
/* ::::: lines connecting cells ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-line {
|
||||
border: 1px dotted #808080;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-line(selected, focus) {
|
||||
border: 1px dotted #FFFFFF;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-separator {
|
||||
border-top: 1px solid #7A8490;
|
||||
border-bottom: 1px solid #FEFEFE;
|
||||
}
|
||||
|
||||
/* ::::: outliner columns ::::: */
|
||||
|
||||
outlinercol,
|
||||
outlinercolpicker {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: #EEF0F3 #C7D0D9;
|
||||
-moz-border-right-colors: #63676B #A5ABB0;
|
||||
-moz-border-bottom-colors: #63676B #A5ABB0;
|
||||
-moz-border-left-colors: #EEF0F3 #C7D0D9;
|
||||
background-color: #C7D0D9;
|
||||
color: #000000;
|
||||
padding: 0px 4px;
|
||||
}
|
||||
|
||||
.outlinercol-image {
|
||||
padding: 0px 1px;
|
||||
}
|
||||
|
||||
.outlinercol-text {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
/* ..... internal box ..... */
|
||||
|
||||
outlinercol:hover:active,
|
||||
outlinercolpicker:hover:active {
|
||||
border-top: 2px solid;
|
||||
border-right: 1px solid;
|
||||
border-bottom: 1px solid;
|
||||
border-left: 2px solid;
|
||||
-moz-border-top-colors: #A5ABB0 #C7D0D9;
|
||||
-moz-border-right-colors: #A5ABB0;
|
||||
-moz-border-bottom-colors: #A5ABB0;
|
||||
-moz-border-left-colors: #A5ABB0 #C7D0D9;
|
||||
padding: 1px 4px 0px 5px;
|
||||
}
|
||||
|
||||
.outlinercol-image:hover:active {
|
||||
padding: 1px 1px 0px 2px;
|
||||
}
|
||||
|
||||
/* ::::: column drag and drop styles ::::: */
|
||||
|
||||
outlinercol[dragging="true"] {
|
||||
-moz-border-top-colors: #000000 #90A1B3 !important;
|
||||
-moz-border-right-colors: #000000 #90A1B3 !important;
|
||||
-moz-border-bottom-colors: #000000 #90A1B3 !important;
|
||||
-moz-border-left-colors: #000000 #90A1B3 !important;
|
||||
background-color: #90A1B3 !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
outlinercol[insertafter="true"] {
|
||||
-moz-border-right-colors: #000000 #666666;
|
||||
}
|
||||
|
||||
outlinercol[insertbefore="true"] {
|
||||
-moz-border-left-colors: #000000 #666666;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-column(insertbefore) {
|
||||
border-left: 1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-column(insertafter) {
|
||||
border-right: 1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
/* ::::: sort direction indicator ::::: */
|
||||
|
||||
.outlinercol-sortdirection {
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
.sortDirectionIndicator[sortDirection="ascending"] > .outlinercol-sortdirection {
|
||||
list-style-image: url("chrome://global/skin/tree/sort-asc.gif");
|
||||
}
|
||||
|
||||
.sortDirectionIndicator[sortDirection="descending"] > .outlinercol-sortdirection {
|
||||
list-style-image: url("chrome://global/skin/tree/sort-dsc.gif");
|
||||
}
|
||||
|
||||
/* ::::: column picker ::::: */
|
||||
|
||||
.outliner-columnpicker-icon {
|
||||
list-style-image: url("chrome://global/skin/tree/columnpicker.gif");
|
||||
}
|
||||
|
||||
/* ::::: twisty ::::: */
|
||||
|
||||
outlinerchildren:-moz-outliner-twisty {
|
||||
padding-right: 2px;
|
||||
width: 10px; /* The image's width is 10 pixels */
|
||||
list-style-image: url("chrome://global/skin/tree/twisty-clsd.gif");
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-twisty(open) {
|
||||
width: 10px; /* The image's width is 10 pixels */
|
||||
list-style-image: url("chrome://global/skin/tree/twisty-open.gif");
|
||||
}
|
||||
|
||||
outlinerchildren:-moz-outliner-indentation {
|
||||
width: 16px;
|
||||
}
|
Загрузка…
Ссылка в новой задаче