mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Make the UI scrollbars now scale in PrintPreview. We are having to do all this rather bizarre
stuff because the scrollbars in the document share all the same code and style contexts of the UI scrollbars Bug 120616 r=dcone sr=attinasi
This commit is contained in:
parent
f4893e2867
commit
ee07c55f61
@ -6532,6 +6532,14 @@ DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings)
|
||||
mPrtPreview = mPrt;
|
||||
mPrt = nsnull;
|
||||
|
||||
// Turning off the scaling of twips so any of the UI scrollbars
|
||||
// will not get scaled
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(mPresContext));
|
||||
if (printPreviewContext) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
mDeviceContext->SetCanonicalPixelScale(mPrtPreview->mOrigDCScale);
|
||||
}
|
||||
|
||||
#endif // NS_PRINT_PREVIEW
|
||||
|
||||
return NS_OK;
|
||||
|
@ -221,8 +221,10 @@ NS_IMETHODIMP nsDeviceContextBeOS::SupportsNativeWidgets(PRBool &aSupportsWidget
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips * scale;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips * scale;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -364,9 +364,11 @@ NS_IMETHODIMP nsDeviceContextGTK::SupportsNativeWidgets(PRBool &aSupportsWidgets
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips;
|
||||
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips * scale;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips * scale;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -201,8 +201,10 @@ NS_IMETHODIMP nsDeviceContextMac :: SupportsNativeWidgets(PRBool &aSupportsWidge
|
||||
NS_IMETHODIMP nsDeviceContextMac :: GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
// XXX Should we push this to widget library
|
||||
aWidth = 16 * mDevUnitsToAppUnits;
|
||||
aHeight = 16 * mDevUnitsToAppUnits;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = 16 * mDevUnitsToAppUnits * scale;
|
||||
aHeight = 16 * mDevUnitsToAppUnits * scale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -346,8 +346,10 @@ NS_IMETHODIMP nsDeviceContextOS2 :: GetCanonicalPixelScale(float &aScale) const
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextOS2 :: GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
aWidth = ::WinQuerySysValue( HWND_DESKTOP, SV_CXVSCROLL) * mDevUnitsToAppUnits;
|
||||
aHeight = ::WinQuerySysValue( HWND_DESKTOP, SV_CYHSCROLL) * mDevUnitsToAppUnits;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = ::WinQuerySysValue( HWND_DESKTOP, SV_CXVSCROLL) * mDevUnitsToAppUnits * scale;
|
||||
aHeight = ::WinQuerySysValue( HWND_DESKTOP, SV_CYHSCROLL) * mDevUnitsToAppUnits * scale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -257,8 +257,10 @@ NS_IMETHODIMP nsDeviceContextPh :: SupportsNativeWidgets( PRBool &aSupportsWidge
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextPh :: GetScrollBarDimensions( float &aWidth, float &aHeight ) const {
|
||||
/* Revisit: the scroll bar sizes is a gross guess based on Phab */
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips * scale;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips * scale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -228,8 +228,10 @@ NS_IMETHODIMP nsDeviceContextPS::GetScrollBarDimensions(float &aWidth, float &aH
|
||||
PR_LOG(nsDeviceContextPSLM, PR_LOG_DEBUG, ("nsDeviceContextPS::GetScrollBarDimensions()\n"));
|
||||
|
||||
//XXX: Hardcoded values for Postscript
|
||||
aWidth = 20.f;
|
||||
aHeight = 20.f;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = 20.f * scale;
|
||||
aHeight = 20.f * scale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -259,8 +259,10 @@ nsDeviceContextQT::SupportsNativeWidgets(PRBool &aSupportsWidgets)
|
||||
NS_IMETHODIMP nsDeviceContextQT::GetScrollBarDimensions(float &aWidth,
|
||||
float &aHeight) const
|
||||
{
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips * scale;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips * scale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -349,8 +349,12 @@ NS_IMETHODIMP nsDeviceContextWin :: SetCanonicalPixelScale(float aScale)
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextWin :: GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
aWidth = ::GetSystemMetrics(SM_CXVSCROLL) * mDevUnitsToAppUnits;
|
||||
aHeight = ::GetSystemMetrics(SM_CXHSCROLL) * mDevUnitsToAppUnits;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
|
||||
aWidth = ::GetSystemMetrics(SM_CXVSCROLL) * mDevUnitsToAppUnits * scale;
|
||||
aHeight = ::GetSystemMetrics(SM_CXHSCROLL) * mDevUnitsToAppUnits * scale;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -244,9 +244,11 @@ NS_IMETHODIMP nsDeviceContextXlib::SupportsNativeWidgets(PRBool &aSupportsWidget
|
||||
NS_IMETHODIMP nsDeviceContextXlib::GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
PR_LOG(DeviceContextXlibLM, PR_LOG_DEBUG, ("nsDeviceContextXlib::GetScrollBarDimensions()\n"));
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
// XXX Oh, yeah. These are hard coded.
|
||||
aWidth = 15 * mPixelsToTwips;
|
||||
aHeight = 15 * mPixelsToTwips;
|
||||
aWidth = 15 * mPixelsToTwips * scale;
|
||||
aHeight = 15 * mPixelsToTwips * scale;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -217,8 +217,10 @@ NS_IMETHODIMP nsDeviceContextXp :: GetScrollBarDimensions(float &aWidth,
|
||||
float &aHeight) const
|
||||
{
|
||||
// XXX Oh, yeah. These are hard coded.
|
||||
aWidth = 15.f * mPixelsToTwips;
|
||||
aHeight = 15.f * mPixelsToTwips;
|
||||
float scale;
|
||||
GetCanonicalPixelScale(scale);
|
||||
aWidth = 15.f * mPixelsToTwips * scale;
|
||||
aHeight = 15.f * mPixelsToTwips * scale;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -5866,6 +5866,22 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresShell* aPresShell,
|
||||
nsIFrame*& aScrollableFrame,
|
||||
nsIFrame* aScrollPortFrame)
|
||||
{
|
||||
// Check to see the type of parent frame so we know whether we need to
|
||||
// turn off/on scaling for the scrollbars
|
||||
//
|
||||
// If the parent is a viewportFrame then we are the scrollbars for the UI
|
||||
// if not then we are scrollbars inside the document.
|
||||
PRBool noScalingOfTwips = PR_FALSE;
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(aPresContext));
|
||||
if (printPreviewContext) {
|
||||
nsCOMPtr<nsIAtom> typeAtom;
|
||||
aParentFrame->GetFrameType(getter_AddRefs(typeAtom));
|
||||
noScalingOfTwips = typeAtom == nsLayoutAtoms::viewportFrame;
|
||||
if (noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame* scrollFrame = nsnull;
|
||||
nsIFrame* parentFrame = nsnull;
|
||||
nsIFrame* gfxScrollFrame = nsnull;
|
||||
@ -5923,6 +5939,9 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresShell* aPresShell,
|
||||
|
||||
aScrolledChildStyle = scrolledPseudoStyle;
|
||||
|
||||
if (printPreviewContext && noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -6011,6 +6030,22 @@ nsCSSFrameConstructor::BuildScrollFrame (nsIPresShell* aPresShell,
|
||||
nsIStyleContext*& aScrolledContentStyle,
|
||||
nsIFrame* aScrollPortFrame)
|
||||
{
|
||||
// Check to see the type of parent frame so we know whether we need to
|
||||
// turn off/on scaling for the scrollbars
|
||||
//
|
||||
// If the parent is a viewportFrame then we are the scrollbars for the UI
|
||||
// if not then we are scrollbars inside the document.
|
||||
PRBool noScalingOfTwips = PR_FALSE;
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(aPresContext));
|
||||
if (printPreviewContext) {
|
||||
nsCOMPtr<nsIAtom> typeAtom;
|
||||
aParentFrame->GetFrameType(getter_AddRefs(typeAtom));
|
||||
noScalingOfTwips = typeAtom == nsLayoutAtoms::viewportFrame;
|
||||
if (noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame *scrollFrame;
|
||||
|
||||
nsCOMPtr<nsIStyleContext> scrolledContentStyle;
|
||||
@ -6044,6 +6079,10 @@ nsCSSFrameConstructor::BuildScrollFrame (nsIPresShell* aPresShell,
|
||||
// now set the primary frame to the ScrollFrame
|
||||
aState.mFrameManager->SetPrimaryFrameFor( aContent, aNewFrame );
|
||||
|
||||
if (noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
@ -6532,6 +6532,14 @@ DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings)
|
||||
mPrtPreview = mPrt;
|
||||
mPrt = nsnull;
|
||||
|
||||
// Turning off the scaling of twips so any of the UI scrollbars
|
||||
// will not get scaled
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(mPresContext));
|
||||
if (printPreviewContext) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
mDeviceContext->SetCanonicalPixelScale(mPrtPreview->mOrigDCScale);
|
||||
}
|
||||
|
||||
#endif // NS_PRINT_PREVIEW
|
||||
|
||||
return NS_OK;
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
NS_IMETHOD SetPrintSettings(nsIPrintSettings* aPS) = 0;
|
||||
NS_IMETHOD GetPrintSettings(nsIPrintSettings** aPS) = 0;
|
||||
|
||||
// Enables the turning on and off of scaling
|
||||
NS_IMETHOD SetScalingOfTwips(PRBool aOn) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -63,16 +63,20 @@ public:
|
||||
NS_IMETHOD SetPageDim(nsRect* aRect);
|
||||
NS_IMETHOD SetPrintSettings(nsIPrintSettings* aPS);
|
||||
NS_IMETHOD GetPrintSettings(nsIPrintSettings** aPS);
|
||||
NS_IMETHOD GetScaledPixelsToTwips(float* aScale) const;
|
||||
NS_IMETHOD SetScalingOfTwips(PRBool aOn) { mDoScaledTwips = aOn; return NS_OK; }
|
||||
|
||||
protected:
|
||||
nsRect mPageDim;
|
||||
PRBool mCanPaginatedScroll;
|
||||
nsCOMPtr<nsIPrintSettings> mPrintSettings;
|
||||
PRPackedBool mDoScaledTwips;
|
||||
};
|
||||
|
||||
PrintPreviewContext::PrintPreviewContext() :
|
||||
mPageDim(-1,-1,-1,-1),
|
||||
mCanPaginatedScroll(PR_TRUE)
|
||||
mCanPaginatedScroll(PR_TRUE),
|
||||
mDoScaledTwips(PR_TRUE)
|
||||
{
|
||||
SetBackgroundImageDraw(PR_FALSE);
|
||||
SetBackgroundColorDraw(PR_FALSE);
|
||||
@ -165,6 +169,30 @@ PrintPreviewContext::GetPrintSettings(nsIPrintSettings * *aPrintSettings)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// The difference between this and GetScaledPixelsToTwips in nsPresContext
|
||||
// is here we check to see if we are scaling twips
|
||||
NS_IMETHODIMP
|
||||
PrintPreviewContext::GetScaledPixelsToTwips(float* aResult) const
|
||||
{
|
||||
NS_PRECONDITION(aResult, "null out param");
|
||||
|
||||
float scale = 1.0f;
|
||||
if (mDeviceContext)
|
||||
{
|
||||
float p2t;
|
||||
mDeviceContext->GetDevUnitsToAppUnits(p2t);
|
||||
if (mDoScaledTwips) {
|
||||
mDeviceContext->GetCanonicalPixelScale(scale);
|
||||
scale = p2t * scale;
|
||||
} else {
|
||||
scale = p2t;
|
||||
}
|
||||
}
|
||||
*aResult = scale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_EXPORT nsresult
|
||||
NS_NewPrintPreviewContext(nsIPrintPreviewContext** aInstancePtrResult)
|
||||
{
|
||||
|
@ -269,6 +269,13 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Turn on the scaling of twips so any of the scrollbars
|
||||
// in the UI no longer get scaled
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(aPresContext));
|
||||
if (printPreviewContext) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_TRUE);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrintPreviewContext> ppContext = do_QueryInterface(aPresContext);
|
||||
|
||||
// See if we can get a Print Settings from the Context
|
||||
@ -531,6 +538,12 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
|
||||
mSize.width = aDesiredSize.width;
|
||||
mSize.height = aDesiredSize.height;
|
||||
|
||||
// Turn off the scaling of twips so any of the scrollbars
|
||||
// in the document get scaled
|
||||
if (printPreviewContext) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
}
|
||||
|
||||
NS_FRAME_TRACE_REFLOW_OUT("nsSimplePageSequeceFrame::Reflow", aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -269,6 +269,13 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Turn on the scaling of twips so any of the scrollbars
|
||||
// in the UI no longer get scaled
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(aPresContext));
|
||||
if (printPreviewContext) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_TRUE);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrintPreviewContext> ppContext = do_QueryInterface(aPresContext);
|
||||
|
||||
// See if we can get a Print Settings from the Context
|
||||
@ -531,6 +538,12 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
|
||||
mSize.width = aDesiredSize.width;
|
||||
mSize.height = aDesiredSize.height;
|
||||
|
||||
// Turn off the scaling of twips so any of the scrollbars
|
||||
// in the document get scaled
|
||||
if (printPreviewContext) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
}
|
||||
|
||||
NS_FRAME_TRACE_REFLOW_OUT("nsSimplePageSequeceFrame::Reflow", aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -5866,6 +5866,22 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresShell* aPresShell,
|
||||
nsIFrame*& aScrollableFrame,
|
||||
nsIFrame* aScrollPortFrame)
|
||||
{
|
||||
// Check to see the type of parent frame so we know whether we need to
|
||||
// turn off/on scaling for the scrollbars
|
||||
//
|
||||
// If the parent is a viewportFrame then we are the scrollbars for the UI
|
||||
// if not then we are scrollbars inside the document.
|
||||
PRBool noScalingOfTwips = PR_FALSE;
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(aPresContext));
|
||||
if (printPreviewContext) {
|
||||
nsCOMPtr<nsIAtom> typeAtom;
|
||||
aParentFrame->GetFrameType(getter_AddRefs(typeAtom));
|
||||
noScalingOfTwips = typeAtom == nsLayoutAtoms::viewportFrame;
|
||||
if (noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame* scrollFrame = nsnull;
|
||||
nsIFrame* parentFrame = nsnull;
|
||||
nsIFrame* gfxScrollFrame = nsnull;
|
||||
@ -5923,6 +5939,9 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresShell* aPresShell,
|
||||
|
||||
aScrolledChildStyle = scrolledPseudoStyle;
|
||||
|
||||
if (printPreviewContext && noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -6011,6 +6030,22 @@ nsCSSFrameConstructor::BuildScrollFrame (nsIPresShell* aPresShell,
|
||||
nsIStyleContext*& aScrolledContentStyle,
|
||||
nsIFrame* aScrollPortFrame)
|
||||
{
|
||||
// Check to see the type of parent frame so we know whether we need to
|
||||
// turn off/on scaling for the scrollbars
|
||||
//
|
||||
// If the parent is a viewportFrame then we are the scrollbars for the UI
|
||||
// if not then we are scrollbars inside the document.
|
||||
PRBool noScalingOfTwips = PR_FALSE;
|
||||
nsCOMPtr<nsIPrintPreviewContext> printPreviewContext(do_QueryInterface(aPresContext));
|
||||
if (printPreviewContext) {
|
||||
nsCOMPtr<nsIAtom> typeAtom;
|
||||
aParentFrame->GetFrameType(getter_AddRefs(typeAtom));
|
||||
noScalingOfTwips = typeAtom == nsLayoutAtoms::viewportFrame;
|
||||
if (noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame *scrollFrame;
|
||||
|
||||
nsCOMPtr<nsIStyleContext> scrolledContentStyle;
|
||||
@ -6044,6 +6079,10 @@ nsCSSFrameConstructor::BuildScrollFrame (nsIPresShell* aPresShell,
|
||||
// now set the primary frame to the ScrollFrame
|
||||
aState.mFrameManager->SetPrimaryFrameFor( aContent, aNewFrame );
|
||||
|
||||
if (noScalingOfTwips) {
|
||||
printPreviewContext->SetScalingOfTwips(PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
@ -36,3 +36,14 @@ scrollbar {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
@media print {
|
||||
html|div scrollbar {
|
||||
-moz-appearance: scrollbar;
|
||||
-moz-binding: url(chrome://global/content/bindings/nativescrollbar.xml#scrollbar);
|
||||
min-width: 16px;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
@ -138,3 +138,108 @@ scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-up.gif")
|
||||
}
|
||||
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
@media print {
|
||||
html|div slider {
|
||||
-moz-appearance: scrollbartrack-horizontal;
|
||||
height: 16px;
|
||||
background: url("chrome://global/skin/scrollbar/slider-hrz.gif") #AAAAAA;
|
||||
}
|
||||
|
||||
html|div slider[orient="vertical"] {
|
||||
-moz-appearance: scrollbartrack-vertical;
|
||||
width: 16px;
|
||||
height: none;
|
||||
background-image: url("chrome://global/skin/scrollbar/slider-vrt.gif");
|
||||
}
|
||||
|
||||
/* ::::: borders for thumb and buttons ::::: */
|
||||
|
||||
html|div thumb {
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: #000000 -moz-mac-accentregularhighlight;
|
||||
-moz-border-right-colors: #000000 -moz-mac-accentlightshadow;
|
||||
-moz-border-bottom-colors: #000000 -moz-mac-accentlightshadow;
|
||||
-moz-border-left-colors: #000000 -moz-mac-accentregularhighlight;
|
||||
min-width: 10px;
|
||||
background: url("chrome://global/skin/scrollbar/thumb-hrz.png") -moz-mac-accentface no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
html|div thumb:active {
|
||||
-moz-border-top-colors: #000000 -moz-mac-accentregularhighlight;
|
||||
-moz-border-right-colors: #000000 -moz-mac-accentlightshadow;
|
||||
-moz-border-bottom-colors: #000000 -moz-mac-accentlightshadow;
|
||||
-moz-border-left-colors: #000000 -moz-mac-accentregularhighlight;
|
||||
background-color: -moz-mac-accentlightshadow;
|
||||
background-image: url("chrome://global/skin/scrollbar/thumb-hrz-act.png");
|
||||
}
|
||||
|
||||
html|div thumb[orient="vertical"] {
|
||||
-moz-appearance: scrollbarthumb-vertical;
|
||||
min-width: 0;
|
||||
min-height: 16px;
|
||||
background-image: url("chrome://global/skin/scrollbar/thumb-vrt.png");
|
||||
}
|
||||
|
||||
html|div thumb[orient="vertical"]:active {
|
||||
background-image: url("chrome://global/skin/scrollbar/thumb-vrt-act.png");
|
||||
}
|
||||
|
||||
/* ::::: thumb (horizontal) ::::: */
|
||||
|
||||
html|div thumb {
|
||||
min-height: 16px;
|
||||
}
|
||||
|
||||
html|div thumb[orient="horizontal"] {
|
||||
-moz-appearance: scrollbarthumb-horizontal;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
/* ::::: scrollbar button ::::: */
|
||||
|
||||
html|div scrollbarbutton {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: #000000 #FFFFFF;
|
||||
-moz-border-right-colors: #000000 #BBBBBB;
|
||||
-moz-border-bottom-colors: #000000 #BBBBBB;
|
||||
-moz-border-left-colors: #000000 #FFFFFF;
|
||||
background: #DDDDDD no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
html|div scrollbarbutton:hover:active {
|
||||
-moz-border-top-colors: #000000 #444444;
|
||||
-moz-border-right-colors: #000000 #AAAAAA;
|
||||
-moz-border-bottom-colors: #000000 #AAAAAA;
|
||||
-moz-border-left-colors: #000000 #444444;
|
||||
background-color: #666666;
|
||||
}
|
||||
|
||||
/* ..... increment .... */
|
||||
|
||||
html|div scrollbarbutton[type="increment"] {
|
||||
-moz-appearance: scrollbarbutton-right;
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-rit.gif")
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
|
||||
-moz-appearance: scrollbarbutton-down;
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-dn.gif")
|
||||
}
|
||||
|
||||
/* ..... decrement .... */
|
||||
|
||||
html|div scrollbarbutton[type="decrement"] {
|
||||
-moz-appearance: scrollbarbutton-left;
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-lft.gif")
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
|
||||
-moz-appearance: scrollbarbutton-up;
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-up.gif")
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */
|
||||
|
||||
/* ::::: scrollbar ::::: */
|
||||
|
||||
@ -113,3 +114,94 @@ scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
|
||||
background-image: url("chrome://global/skin/arrow/arrow-up.gif")
|
||||
}
|
||||
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
@media print {
|
||||
/* ::::: scrollbar ::::: */
|
||||
|
||||
html|div scrollbar {
|
||||
-moz-appearance: scrollbartrack-horizontal;
|
||||
-moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar");
|
||||
cursor: default;
|
||||
background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar;
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"]
|
||||
{
|
||||
-moz-appearance: scrollbartrack-vertical;
|
||||
}
|
||||
|
||||
/* ::::: borders for thumb and buttons ::::: */
|
||||
|
||||
html|div thumb,
|
||||
html|div scrollbarbutton {
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
|
||||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
|
||||
background-color: -moz-Dialog;
|
||||
}
|
||||
|
||||
/* ::::: thumb (horizontal) ::::: */
|
||||
|
||||
html|div thumb {
|
||||
-moz-appearance: scrollbarthumb-vertical;
|
||||
min-height: 8px;
|
||||
}
|
||||
|
||||
html|div thumb[orient="horizontal"] {
|
||||
-moz-appearance: scrollbarthumb-horizontal;
|
||||
min-width: 8px;
|
||||
}
|
||||
|
||||
html|div thumb > gripper {
|
||||
-moz-appearance: scrollbargripper-vertical;
|
||||
}
|
||||
|
||||
html|div thumb[orient="horizontal"] > gripper {
|
||||
-moz-appearance: scrollbargripper-horizontal;
|
||||
}
|
||||
|
||||
/* ::::: scrollbar button ::::: */
|
||||
|
||||
html|div scrollbarbutton {
|
||||
background: -moz-Dialog no-repeat 0px 1px;
|
||||
min-width: 16px;
|
||||
min-height: 16px;
|
||||
}
|
||||
|
||||
html|div scrollbarbutton:hover:active {
|
||||
-moz-border-top-colors: ThreeDShadow -moz-Dialog;
|
||||
-moz-border-right-colors: ThreeDShadow -moz-Dialog;
|
||||
-moz-border-bottom-colors: ThreeDShadow -moz-Dialog;
|
||||
-moz-border-left-colors: ThreeDShadow -moz-Dialog;
|
||||
background-position: 1px 2px;
|
||||
}
|
||||
|
||||
/* ..... increment .... */
|
||||
|
||||
html|div scrollbarbutton[type="increment"] {
|
||||
-moz-appearance: scrollbarbutton-right;
|
||||
background-image: url("chrome://global/skin/arrow/arrow-rit.gif")
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
|
||||
-moz-appearance: scrollbarbutton-down;
|
||||
background-image: url("chrome://global/skin/arrow/arrow-dn.gif")
|
||||
}
|
||||
|
||||
/* ..... decrement .... */
|
||||
|
||||
html|div scrollbarbutton[type="decrement"] {
|
||||
-moz-appearance: scrollbarbutton-left;
|
||||
background-image: url("chrome://global/skin/arrow/arrow-lft.gif")
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
|
||||
-moz-appearance: scrollbarbutton-up;
|
||||
background-image: url("chrome://global/skin/arrow/arrow-up.gif")
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -40,6 +40,7 @@
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */
|
||||
|
||||
/* ::::: scrollbar ::::: */
|
||||
|
||||
@ -129,3 +130,90 @@ scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-up.gif")
|
||||
}
|
||||
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
|
||||
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
|
||||
@media print {
|
||||
|
||||
/* ::::: slider ::::: */
|
||||
|
||||
html|div slider {
|
||||
height: 15px;
|
||||
background: url("chrome://global/skin/scrollbar/slider-hrz.gif") repeat-x;
|
||||
}
|
||||
|
||||
html|div slider[orient="vertical"] {
|
||||
width: 15px;
|
||||
background: url("chrome://global/skin/scrollbar/slider-vrt.gif") repeat-y;
|
||||
}
|
||||
|
||||
/* ::::: borders for thumb and buttons ::::: */
|
||||
|
||||
html|div thumb,
|
||||
html|div scrollbarbutton {
|
||||
border: 3px solid;
|
||||
-moz-border-top-colors: #000000 #E4EBF2 #C3CAD2;
|
||||
-moz-border-right-colors: #000000 #8F9DAD #A4AFBB;
|
||||
-moz-border-bottom-colors: #000000 #8F9DAD #A4AFBB;
|
||||
-moz-border-left-colors: #000000 #E4EBF2 #C3CAD2;
|
||||
background: #B1BBC5 50% 50% no-repeat;
|
||||
}
|
||||
|
||||
html|div thumb:active {
|
||||
background-color: #C2CCD6;
|
||||
-moz-border-top-colors: #111111 #F5FCF3 #D4DBE3;
|
||||
-moz-border-right-colors: #111111 #9FAEBE #B5BFCC;
|
||||
-moz-border-bottom-colors: #111111 #9FAEBE #B5BFCC;
|
||||
-moz-border-left-colors: #111111 #D5FCF3 #D4DBE3;
|
||||
}
|
||||
|
||||
/* ::::: thumb (horizontal) ::::: */
|
||||
|
||||
html|div thumb {
|
||||
min-height: 18px;
|
||||
background-image: url("chrome://global/skin/scrollbar/thumb-vrt-grip.gif");
|
||||
}
|
||||
|
||||
html|div thumb[orient="horizontal"] {
|
||||
min-width: 18px;
|
||||
background-image: url("chrome://global/skin/scrollbar/thumb-hrz-grip.gif");
|
||||
}
|
||||
|
||||
/* ::::: scrollbar button ::::: */
|
||||
|
||||
html|div scrollbarbutton {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
html|div scrollbarbutton:hover:active {
|
||||
border-left-width: 2px;
|
||||
border-right-width: 2px;
|
||||
-moz-border-top-colors: #000000 #708092 #939FAD;
|
||||
-moz-border-right-colors: #000000 #718193 #9EA9B5;
|
||||
-moz-border-bottom-colors: #000000 #8795A4 #929EAC;
|
||||
-moz-border-left-colors: #000000 #ADB6C0 #9EA9B5;
|
||||
background-color: #9CA8B4;
|
||||
}
|
||||
|
||||
/* ..... increment .... */
|
||||
|
||||
html|div scrollbarbutton[type="increment"] {
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-rit.gif")
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-dn.gif")
|
||||
}
|
||||
|
||||
/* ..... decrement .... */
|
||||
|
||||
html|div scrollbarbutton[type="decrement"] {
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-lft.gif")
|
||||
}
|
||||
|
||||
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
|
||||
background-image: url("chrome://global/skin/scrollbar/btn-up.gif")
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user