зеркало из https://github.com/mozilla/pjs.git
Fix for 115748, r=bryner, sr=sspitzer
This commit is contained in:
Родитель
480e6bab51
Коммит
93abe6b742
|
@ -434,7 +434,9 @@ CSS_KEY(treeheader, treeheader)
|
|||
CSS_KEY(treeheadercell, treeheadercell)
|
||||
CSS_KEY(treeheadersortarrow, treeheadersortarrow)
|
||||
CSS_KEY(progressbar, progressbar)
|
||||
CSS_KEY(progressbar-vertical, progressbar_vertical)
|
||||
CSS_KEY(progresschunk, progresschunk)
|
||||
CSS_KEY(progresschunk-vertical, progresschunk_vertical)
|
||||
CSS_KEY(tab, tab)
|
||||
CSS_KEY(tabpanel, tabpanel)
|
||||
CSS_KEY(tooltip, tooltip)
|
||||
|
|
|
@ -151,6 +151,8 @@ const PRInt32 nsCSSProps::kAppearanceKTable[] = {
|
|||
eCSSKeyword_treeheadersortarrow, NS_THEME_TREEVIEW_HEADER_SORTARROW,
|
||||
eCSSKeyword_progressbar, NS_THEME_PROGRESSBAR,
|
||||
eCSSKeyword_progresschunk, NS_THEME_PROGRESSBAR_CHUNK,
|
||||
eCSSKeyword_progressbar_vertical, NS_THEME_PROGRESSBAR_VERTICAL,
|
||||
eCSSKeyword_progresschunk_vertical, NS_THEME_PROGRESSBAR_CHUNK_VERTICAL,
|
||||
eCSSKeyword_tab, NS_THEME_TAB,
|
||||
eCSSKeyword_tabpanel, NS_THEME_TAB_PANEL,
|
||||
eCSSKeyword_tooltip, NS_THEME_TOOLTIP,
|
||||
|
|
|
@ -146,9 +146,11 @@ editor.xul has these - do we need them?
|
|||
|
||||
<statusbar id="status-bar">
|
||||
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
|
||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0">
|
||||
<observes element="Editor:Throbber" attribute="busy"/>
|
||||
</progressmeter>
|
||||
<statusbarpanel class="statusbarpanel-progress">
|
||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0">
|
||||
<observes element="Editor:Throbber" attribute="busy"/>
|
||||
</progressmeter>
|
||||
</statusbarpanel>
|
||||
<statusbarpanel id="statusText" label="&statusText.label;" flex="1" crop="right"/>
|
||||
</statusbar>
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
<statusbar id="status-bar">
|
||||
<statusbarpanel id="txStatusPanel" flex="1"/>
|
||||
<progressmeter id="pmStatus" mode="normal" value="0" class="progressmeter-statusbar"/>
|
||||
<statusbarpanel class="statusbarpanel-progress">
|
||||
<progressmeter id="pmStatus" mode="normal" value="0" class="progressmeter-statusbar"/>
|
||||
</statusbarpanel>
|
||||
</statusbar>
|
||||
|
||||
</overlay>
|
||||
|
|
|
@ -71,12 +71,18 @@
|
|||
// The sort arrow for a header.
|
||||
#define NS_THEME_TREEVIEW_HEADER_SORTARROW 47
|
||||
|
||||
// A progress bar.
|
||||
// A horizontal progress bar.
|
||||
#define NS_THEME_PROGRESSBAR 51
|
||||
|
||||
// The progress bar's progress indicator
|
||||
#define NS_THEME_PROGRESSBAR_CHUNK 52
|
||||
|
||||
// A vertical progress bar.
|
||||
#define NS_THEME_PROGRESSBAR_VERTICAL 53
|
||||
|
||||
// A vertical progress chunk
|
||||
#define NS_THEME_PROGRESSBAR_CHUNK_VERTICAL 54
|
||||
|
||||
// A single tab in a tab widget.
|
||||
#define NS_THEME_TAB 61
|
||||
|
||||
|
|
|
@ -59,15 +59,17 @@
|
|||
#define THEME_COLOR 204
|
||||
#define THEME_FONT 210
|
||||
|
||||
// Generic state constants
|
||||
#define TS_NORMAL 1
|
||||
#define TS_HOVER 2
|
||||
#define TS_ACTIVE 3
|
||||
#define TS_DISABLED 4
|
||||
|
||||
// Button constants
|
||||
#define TP_BUTTON 1
|
||||
#define TP_RADIO 2
|
||||
#define TP_CHECKBOX 3
|
||||
#define BP_NORMAL 1
|
||||
#define BP_HOVER 2
|
||||
#define BP_ACTIVE 3
|
||||
#define BP_DISABLED 4
|
||||
#define BP_DEFAULT 5
|
||||
#define BP_BUTTON 1
|
||||
#define BP_RADIO 2
|
||||
#define BP_CHECKBOX 3
|
||||
#define BS_DEFAULT 5
|
||||
|
||||
// Scrollbar constants
|
||||
#define SP_BUTTON 1
|
||||
|
@ -80,6 +82,12 @@
|
|||
#define SP_GRIPPERHOR 8
|
||||
#define SP_GRIPPERVERT 9
|
||||
|
||||
// Progress bar constants
|
||||
#define PP_BAR 1
|
||||
#define PP_BARVERT 2
|
||||
#define PP_CHUNK 3
|
||||
#define PP_CHUNKVERT 4
|
||||
|
||||
// Tab constants
|
||||
#define TABP_TAB_SELAFTER 2
|
||||
#define TABP_TAB_SELBEFORE 3
|
||||
|
@ -126,6 +134,7 @@ nsNativeThemeWin::nsNativeThemeWin() {
|
|||
mButtonTheme = NULL;
|
||||
mToolbarTheme = NULL;
|
||||
mRebarTheme = NULL;
|
||||
mProgressTheme = NULL;
|
||||
mScrollbarTheme = NULL;
|
||||
mStatusbarTheme = NULL;
|
||||
mTabTheme = NULL;
|
||||
|
@ -191,6 +200,14 @@ nsNativeThemeWin::GetTheme(PRUint8 aWidgetType)
|
|||
mToolbarTheme = openTheme(NULL, L"Toolbar");
|
||||
return mToolbarTheme;
|
||||
}
|
||||
case NS_THEME_PROGRESSBAR:
|
||||
case NS_THEME_PROGRESSBAR_VERTICAL:
|
||||
case NS_THEME_PROGRESSBAR_CHUNK:
|
||||
case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL: {
|
||||
if (!mProgressTheme)
|
||||
mProgressTheme = openTheme(NULL, L"Progress");
|
||||
return mProgressTheme;
|
||||
}
|
||||
case NS_THEME_TAB:
|
||||
case NS_THEME_TAB_PANEL: {
|
||||
if (!mTabTheme)
|
||||
|
@ -313,43 +330,43 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
{
|
||||
switch (aWidgetType) {
|
||||
case NS_THEME_BUTTON: {
|
||||
aPart = TP_BUTTON;
|
||||
aPart = BP_BUTTON;
|
||||
if (!aFrame) {
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (IsDisabled(aFrame)) {
|
||||
aState = BP_DISABLED;
|
||||
aState = TS_DISABLED;
|
||||
return NS_OK;
|
||||
}
|
||||
PRInt32 eventState = GetContentState(aFrame);
|
||||
if (eventState & NS_EVENT_STATE_HOVER && eventState & NS_EVENT_STATE_ACTIVE)
|
||||
aState = BP_ACTIVE;
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_FOCUS)
|
||||
aState = BP_DEFAULT;
|
||||
aState = BS_DEFAULT;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = BP_HOVER;
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_RADIO: {
|
||||
aPart = (aWidgetType == NS_THEME_CHECKBOX) ? TP_CHECKBOX : TP_RADIO;
|
||||
aPart = (aWidgetType == NS_THEME_CHECKBOX) ? BP_CHECKBOX : BP_RADIO;
|
||||
if (!aFrame)
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
else if (IsDisabled(aFrame))
|
||||
aState = BP_DISABLED;
|
||||
aState = TS_DISABLED;
|
||||
else {
|
||||
PRInt32 eventState = GetContentState(aFrame);
|
||||
if (eventState & NS_EVENT_STATE_HOVER && eventState & NS_EVENT_STATE_ACTIVE)
|
||||
aState = BP_ACTIVE;
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = BP_HOVER;
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
}
|
||||
|
||||
// XXXdwh This check will need to be more complicated, since HTML radio groups
|
||||
|
@ -360,24 +377,44 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
aState += 4; // 4 unchecked states, 4 checked states.
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_PROGRESSBAR: {
|
||||
aPart = PP_BAR;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_PROGRESSBAR_CHUNK: {
|
||||
aPart = PP_CHUNK;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_PROGRESSBAR_VERTICAL: {
|
||||
aPart = PP_BARVERT;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL: {
|
||||
aPart = PP_CHUNKVERT;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_TOOLBAR_BUTTON: {
|
||||
aPart = TP_BUTTON;
|
||||
aPart = BP_BUTTON;
|
||||
if (!aFrame) {
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (IsDisabled(aFrame)) {
|
||||
aState = BP_DISABLED;
|
||||
aState = TS_DISABLED;
|
||||
return NS_OK;
|
||||
}
|
||||
PRInt32 eventState = GetContentState(aFrame);
|
||||
if (eventState & NS_EVENT_STATE_HOVER && eventState & NS_EVENT_STATE_ACTIVE)
|
||||
aState = BP_ACTIVE;
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = BP_HOVER;
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -388,17 +425,17 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
aPart = SP_BUTTON;
|
||||
aState = (aWidgetType - NS_THEME_SCROLLBAR_BUTTON_UP)*4;
|
||||
if (!aFrame)
|
||||
aState += BP_NORMAL;
|
||||
aState += TS_NORMAL;
|
||||
else if (IsDisabled(aFrame))
|
||||
aState += BP_DISABLED;
|
||||
aState += TS_DISABLED;
|
||||
else {
|
||||
PRInt32 eventState = GetContentState(aFrame);
|
||||
if (eventState & NS_EVENT_STATE_HOVER && eventState & NS_EVENT_STATE_ACTIVE)
|
||||
aState += BP_ACTIVE;
|
||||
aState += TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState += BP_HOVER;
|
||||
aState += TS_HOVER;
|
||||
else
|
||||
aState += BP_NORMAL;
|
||||
aState += TS_NORMAL;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -406,7 +443,7 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
case NS_THEME_SCROLLBAR_TRACK_VERTICAL: {
|
||||
aPart = (aWidgetType == NS_THEME_SCROLLBAR_TRACK_HORIZONTAL) ?
|
||||
SP_TRACKSTARTHOR : SP_TRACKSTARTVERT;
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
|
||||
|
@ -414,19 +451,19 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
aPart = (aWidgetType == NS_THEME_SCROLLBAR_THUMB_HORIZONTAL) ?
|
||||
SP_THUMBHOR : SP_THUMBVERT;
|
||||
if (!aFrame)
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
else if (IsDisabled(aFrame))
|
||||
aState = BP_DISABLED;
|
||||
aState = TS_DISABLED;
|
||||
else {
|
||||
PRInt32 eventState = GetContentState(aFrame);
|
||||
if (eventState & NS_EVENT_STATE_ACTIVE) // Hover is not also a requirement for
|
||||
// the thumb, since the drag is not canceled
|
||||
// when you move outside the thumb.
|
||||
aState = BP_ACTIVE;
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = BP_HOVER;
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -435,9 +472,9 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
aPart = (aWidgetType == NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL) ?
|
||||
SP_GRIPPERHOR : SP_GRIPPERVERT;
|
||||
if (!aFrame)
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
else if (IsDisabled(aFrame))
|
||||
aState = BP_DISABLED;
|
||||
aState = TS_DISABLED;
|
||||
else {
|
||||
// XXXdwh The gripper needs to get a hover attribute set on it, since it
|
||||
// never goes into :hover.
|
||||
|
@ -445,11 +482,11 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
if (eventState & NS_EVENT_STATE_ACTIVE) // Hover is not also a requirement for
|
||||
// the gripper, since the drag is not canceled
|
||||
// when you move outside the gripper.
|
||||
aState = BP_ACTIVE;
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = BP_HOVER;
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -463,35 +500,35 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
case NS_THEME_STATUSBAR_RESIZER_PANEL:
|
||||
case NS_THEME_RESIZER: {
|
||||
aPart = (aWidgetType - NS_THEME_STATUSBAR_PANEL) + 1;
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_TAB: {
|
||||
aPart = TABP_TAB;
|
||||
if (!aFrame) {
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (IsDisabled(aFrame)) {
|
||||
aState = BP_DISABLED;
|
||||
aState = TS_DISABLED;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (IsSelected(aFrame)) {
|
||||
aPart = TABP_TAB_SELECTED;
|
||||
aState = BP_ACTIVE; // The selected tab is always "pressed".
|
||||
aState = TS_ACTIVE; // The selected tab is always "pressed".
|
||||
}
|
||||
else {
|
||||
PRInt32 eventState = GetContentState(aFrame);
|
||||
if (eventState & NS_EVENT_STATE_HOVER && eventState & NS_EVENT_STATE_ACTIVE)
|
||||
aState = BP_ACTIVE;
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_FOCUS)
|
||||
aState = BP_DEFAULT;
|
||||
aState = BS_DEFAULT;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = BP_HOVER;
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = BP_NORMAL;
|
||||
aState = TS_NORMAL;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -577,12 +614,11 @@ nsNativeThemeWin::GetWidgetBorder(nsIDeviceContext* aContext,
|
|||
if (!getThemeContentRect)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
(*aResult).top = (*aResult).bottom = (*aResult).left = (*aResult).right = 0;
|
||||
|
||||
if (aWidgetType == NS_THEME_TOOLBOX || aWidgetType == NS_THEME_TOOLBAR ||
|
||||
aWidgetType == NS_THEME_STATUSBAR ||
|
||||
aWidgetType == NS_THEME_RESIZER ||
|
||||
aWidgetType == NS_THEME_SCROLLBAR ||
|
||||
aWidgetType == NS_THEME_SCROLLBAR_TRACK_VERTICAL ||
|
||||
aWidgetType == NS_THEME_SCROLLBAR_TRACK_HORIZONTAL)
|
||||
aWidgetType == NS_THEME_RESIZER)
|
||||
return NS_OK; // Don't worry about it.
|
||||
|
||||
HANDLE theme = GetTheme(aWidgetType);
|
||||
|
@ -621,8 +657,11 @@ nsNativeThemeWin::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame*
|
|||
if (!getThemePartSize)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
(*aResult).width = (*aResult).height = 0;
|
||||
|
||||
if (aWidgetType == NS_THEME_TOOLBOX || aWidgetType == NS_THEME_TOOLBAR ||
|
||||
aWidgetType == NS_THEME_STATUSBAR)
|
||||
aWidgetType == NS_THEME_STATUSBAR || aWidgetType == NS_THEME_PROGRESSBAR_CHUNK ||
|
||||
aWidgetType == NS_THEME_PROGRESSBAR_CHUNK_VERTICAL)
|
||||
return NS_OK; // Don't worry about it.
|
||||
|
||||
HANDLE theme = GetTheme(aWidgetType);
|
||||
|
@ -660,7 +699,11 @@ nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
aWidgetType == NS_THEME_SCROLLBAR_TRACK_VERTICAL ||
|
||||
aWidgetType == NS_THEME_SCROLLBAR_TRACK_HORIZONTAL ||
|
||||
aWidgetType == NS_THEME_STATUSBAR || aWidgetType == NS_THEME_STATUSBAR_PANEL ||
|
||||
aWidgetType == NS_THEME_STATUSBAR_RESIZER_PANEL) {
|
||||
aWidgetType == NS_THEME_STATUSBAR_RESIZER_PANEL ||
|
||||
aWidgetType == NS_THEME_PROGRESSBAR_CHUNK ||
|
||||
aWidgetType == NS_THEME_PROGRESSBAR_CHUNK_VERTICAL ||
|
||||
aWidgetType == NS_THEME_PROGRESSBAR ||
|
||||
aWidgetType == NS_THEME_PROGRESSBAR_VERTICAL) {
|
||||
*aShouldRepaint = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -687,9 +730,6 @@ nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
void
|
||||
nsNativeThemeWin::CloseData()
|
||||
{
|
||||
// XXXdwh Calling closeTheme trashes the this ptr and causes horrible things
|
||||
// to happen. For now, just drop the stale handles without closing them.
|
||||
// Is this a bug in the API, or is there something I'm doing wrong?
|
||||
if (mToolbarTheme) {
|
||||
closeTheme(mToolbarTheme);
|
||||
mToolbarTheme = NULL;
|
||||
|
@ -702,6 +742,10 @@ nsNativeThemeWin::CloseData()
|
|||
closeTheme(mRebarTheme);
|
||||
mRebarTheme = NULL;
|
||||
}
|
||||
if (mProgressTheme) {
|
||||
closeTheme(mProgressTheme);
|
||||
mProgressTheme = NULL;
|
||||
}
|
||||
if (mButtonTheme) {
|
||||
closeTheme(mButtonTheme);
|
||||
mButtonTheme = NULL;
|
||||
|
|
|
@ -72,6 +72,7 @@ private:
|
|||
HANDLE mButtonTheme;
|
||||
HANDLE mToolbarTheme;
|
||||
HANDLE mRebarTheme;
|
||||
HANDLE mProgressTheme;
|
||||
HANDLE mScrollbarTheme;
|
||||
HANDLE mStatusbarTheme;
|
||||
HANDLE mTabTheme;
|
||||
|
|
|
@ -434,7 +434,9 @@ CSS_KEY(treeheader, treeheader)
|
|||
CSS_KEY(treeheadercell, treeheadercell)
|
||||
CSS_KEY(treeheadersortarrow, treeheadersortarrow)
|
||||
CSS_KEY(progressbar, progressbar)
|
||||
CSS_KEY(progressbar-vertical, progressbar_vertical)
|
||||
CSS_KEY(progresschunk, progresschunk)
|
||||
CSS_KEY(progresschunk-vertical, progresschunk_vertical)
|
||||
CSS_KEY(tab, tab)
|
||||
CSS_KEY(tabpanel, tabpanel)
|
||||
CSS_KEY(tooltip, tooltip)
|
||||
|
|
|
@ -151,6 +151,8 @@ const PRInt32 nsCSSProps::kAppearanceKTable[] = {
|
|||
eCSSKeyword_treeheadersortarrow, NS_THEME_TREEVIEW_HEADER_SORTARROW,
|
||||
eCSSKeyword_progressbar, NS_THEME_PROGRESSBAR,
|
||||
eCSSKeyword_progresschunk, NS_THEME_PROGRESSBAR_CHUNK,
|
||||
eCSSKeyword_progressbar_vertical, NS_THEME_PROGRESSBAR_VERTICAL,
|
||||
eCSSKeyword_progresschunk_vertical, NS_THEME_PROGRESSBAR_CHUNK_VERTICAL,
|
||||
eCSSKeyword_tab, NS_THEME_TAB,
|
||||
eCSSKeyword_tabpanel, NS_THEME_TAB_PANEL,
|
||||
eCSSKeyword_tooltip, NS_THEME_TOOLTIP,
|
||||
|
|
|
@ -1295,6 +1295,10 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize)
|
|||
aState.GetPresContext()->GetScaledPixelsToTwips(&p2t);
|
||||
aSize.width = NSIntPixelsToTwips(size.width, p2t);
|
||||
aSize.height = NSIntPixelsToTwips(size.height, p2t);
|
||||
if (aSize.width)
|
||||
widthSet = PR_TRUE;
|
||||
if (aSize.height)
|
||||
heightSet = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1308,7 +1312,7 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize)
|
|||
// we will assume 0 means not set.
|
||||
if (position->mMinWidth.GetUnit() == eStyleUnit_Coord) {
|
||||
nscoord min = position->mMinWidth.GetCoordValue();
|
||||
if (min != 0) {
|
||||
if (min && min > aSize.width) {
|
||||
aSize.width = min;
|
||||
widthSet = PR_TRUE;
|
||||
}
|
||||
|
@ -1316,7 +1320,7 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize)
|
|||
|
||||
if (position->mMinHeight.GetUnit() == eStyleUnit_Coord) {
|
||||
nscoord min = position->mMinHeight.GetCoordValue();
|
||||
if (min != 0) {
|
||||
if (min && min > aSize.height) {
|
||||
aSize.height = min;
|
||||
heightSet = PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -1482,8 +1482,10 @@ Rights Reserved.
|
|||
<statusbar class="chromeclass-status" id="status-bar">
|
||||
<hbox insertbefore="unreadMessageCount" flex="1">
|
||||
<statusbarpanel id="component-bar"/>
|
||||
<statusbarpanel id="statusText" label="&statusText.label;" flex="1"/>
|
||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0" oncommand="dumpProgress()"/>
|
||||
<statusbarpanel id="statusText" label="&statusText.label;" flex="1"/>
|
||||
<statusbarpanel class="statusbarpanel-progress">
|
||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0" oncommand="dumpProgress()"/>
|
||||
</statusbarpanel>
|
||||
</hbox>
|
||||
<hbox insertafter="totalMessageCount">
|
||||
<statusbarpanel checkfunc="MailCheckBeforeOfflineChange()" id="offline-status" class="statusbarpanel-iconic"/>
|
||||
|
|
|
@ -111,13 +111,10 @@ statusbar {
|
|||
border-left: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
min-width: 1px; /* DON'T DELETE!
|
||||
Prevents hiding of scrollbars in browser when window is made smaller.*/
|
||||
min-height: 1.9em !important;
|
||||
background-color: -moz-Dialog;
|
||||
}
|
||||
|
||||
statusbarpanel, .statusbar-resizerpanel {
|
||||
statusbarpanel {
|
||||
-moz-appearance: statusbarpanel;
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
/* ::::: progressmeter ::::: */
|
||||
|
||||
progressmeter {
|
||||
-moz-appearance: progressbar;
|
||||
margin: 2px 4px;
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow -moz-Dialog;
|
||||
|
@ -52,14 +53,16 @@ progressmeter {
|
|||
-moz-border-left-colors: ThreeDShadow -moz-Dialog;
|
||||
background-color: -moz-Dialog;
|
||||
min-width: 128px;
|
||||
height: 15px;
|
||||
min-height: 15px;
|
||||
}
|
||||
|
||||
progressmeter[mode="undetermined"] {
|
||||
background: url("chrome://global/skin/progressmeter/progressmeter-busy.gif") repeat-x 0% 50%;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
.progress-bar
|
||||
{
|
||||
-moz-appearance: progresschunk;
|
||||
min-width: 0px;
|
||||
background-color: ThreeDShadow;
|
||||
}
|
||||
|
|
|
@ -30,21 +30,24 @@
|
|||
/* ::::: scrollbar ::::: */
|
||||
|
||||
scrollbar {
|
||||
-moz-appearance: 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;
|
||||
}
|
||||
|
||||
scrollbar[orient="vertical"]
|
||||
{
|
||||
-moz-appearance: scrollbartrack-vertical;
|
||||
}
|
||||
|
||||
/* ::::: slider ::::: */
|
||||
|
||||
slider {
|
||||
-moz-appearance: scrollbartrack-horizontal;
|
||||
height: 16px;
|
||||
background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar;
|
||||
}
|
||||
|
||||
slider[orient="vertical"] {
|
||||
-moz-appearance: scrollbartrack-vertical;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,21 @@ statusbarpanel {
|
|||
padding: 0px 4px;
|
||||
}
|
||||
|
||||
.statusbar-resizerpanel
|
||||
{
|
||||
border: 0px;
|
||||
-moz-box-align: end;
|
||||
-moz-box-pack: end;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.statusbarpanel-progress {
|
||||
-moz-box-align: stretch;
|
||||
border: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.statusbarpanel-iconic {
|
||||
padding: 0px;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ progressmeter[mode="undetermined"] {
|
|||
|
||||
.progressmeter-statusbar {
|
||||
margin: 0;
|
||||
border-bottom: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
-moz-border-top-colors: #E0ECF6 #C7D0D9;
|
||||
-moz-border-right-colors: #8997A1 #C7D0D9;
|
||||
-moz-border-left-colors: #E0ECF6 #C7D0D9;
|
||||
|
|
|
@ -389,7 +389,9 @@ Contributor(s): ______________________________________. -->
|
|||
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
|
||||
<statusbarpanel id="component-bar"/>
|
||||
<statusbarpanel id="statusbar-display" label="&statusText.label;" flex="1"/>
|
||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
|
||||
<statusbarpanel class="statusbarpanel-progress">
|
||||
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
|
||||
</statusbarpanel>
|
||||
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
|
||||
<statusbarpanel class="statusbarpanel-iconic" id="security-button"/>
|
||||
</statusbar>
|
||||
|
|
Загрузка…
Ссылка в новой задаче