Bug 451300 - "Add Aero Glass to Ctrl-Tab" [r+ui-r=mconnor r=vlad]

This commit is contained in:
Rob Arnold 2008-08-20 00:41:37 -05:00
Родитель 5e6731a22b
Коммит b77a5081f4
6 изменённых файлов: 53 добавлений и 20 удалений

Просмотреть файл

@ -287,7 +287,7 @@ var ctrlTab = {
let boxes = this.container.childNodes;
for (let i = boxes.length - 1; i >= 0; i--) {
if (boxes[i]._tab == aTab && boxes[i] == this.selected) {
this.label[aAttrName == "label" ? "value" : aAttrName] =
this.label[aAttrName == "label" ? "textContent" : aAttrName] =
aTab.getAttribute(aAttrName);
break;
}
@ -306,8 +306,8 @@ var ctrlTab = {
this.stopScroll();
let (next = this.invertDirection ? this.selected.previousSibling : this.selected.nextSibling) {
this.setStatusbarValue(next);
this.label.value = next._tab.label;
this.label.crop = next._tab.crop;
this.label.textContent = next._tab.label;
//this.label.crop = next._tab.crop;
}
const FRAME_LENGTH = 40;
@ -380,8 +380,8 @@ var ctrlTab = {
if (selected) {
box.setAttribute("selected", "true");
this.setStatusbarValue(box);
this.label.value = box._tab.label;
this.label.crop = box._tab.crop;
this.label.textContent = box._tab.label;
//this.label.crop = box._tab.crop;
} else {
box.removeAttribute("selected");
}
@ -488,7 +488,7 @@ var ctrlTab = {
this.selected = null;
this.invertDirection = false;
this._uniqid = 0;
this.label.value = "";
this.label.textContent = "";
this.setStatusbarValue();
this.container.removeAttribute("transform");
this.svgRoot.forceRedraw();

Просмотреть файл

@ -62,6 +62,7 @@
<window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="BrowserStartup()" onunload="BrowserShutdown()" onclose="return WindowIsClosing();"
@ -235,7 +236,9 @@
</tooltip>
<panel id="ctrlTab-panel" class="KUI-panel" hidden="true">
<label id="ctrlTab-label" flex="1"/>
<html:div id="ctrlTab-label-parent">
<html:span id="ctrlTab-label" height="100%"></html:span>
</html:div>
<svg:svg id="ctrlTab-svgRoot">
<svg:defs>
<svg:linearGradient id="ctrlTab-fadeGradient" x1="1" y1="1" x2="1" y2="0">

Просмотреть файл

@ -81,3 +81,23 @@
position: relative;
z-index: 10;
}
.KUI-panel:-moz-system-metric(windows-compositor) {
background: transparent;
-moz-appearance: -moz-win-glass;
-moz-border-radius: 0 0 0 0;
border: none;
}
html|*#ctrlTab-label:-moz-system-metric(windows-compositor) {
font: Segoe UI, window;
font-weight: normal;
font-size: 16px;
color: black;
text-shadow: white 0px 0px 9px, white 0px 0px 9px, white 0px 0px 9px;
}
svg|*#ctrlTab-groundFade:-moz-system-metric(windows-compositor),
svg|*.ctrlTab-reflection:-moz-system-metric(windows-compositor) {
display: none;
}

Просмотреть файл

@ -2086,14 +2086,18 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
-moz-border-bottom-colors: #ccc black black black black black black black black;
}
#ctrlTab-label {
font-weight: bold;
font-size: 14px;
html|*#ctrlTab-label-parent {
text-align: center;
overflow: hidden;
margin-top: 6px;
margin-bottom: 10px;
}
html|*#ctrlTab-label {
font-weight: bold;
font-size: 14px;
}
svg|*.ctrlTab-thumbnailborder {
stroke: white;
stroke-width: 1px;

Просмотреть файл

@ -210,9 +210,10 @@ nsMenuPopupFrame::CreateWidgetForView(nsIView* aView)
widgetData.clipSiblings = PR_TRUE;
widgetData.mPopupHint = mPopupType;
nsTransparencyMode mode = nsLayoutUtils::GetFrameTransparency(this);
PRBool viewHasTransparentContent = !mInContentShell &&
(eTransparencyTransparent ==
nsLayoutUtils::GetFrameTransparency(this));
mode);
nsIContent* parentContent = GetContent()->GetParent();
nsIAtom *tag = nsnull;
if (parentContent)
@ -247,8 +248,7 @@ nsMenuPopupFrame::CreateWidgetForView(nsIView* aView)
aView->CreateWidget(kCChildCID, &widgetData, nsnull, PR_TRUE, PR_TRUE,
eContentTypeInherit, parentWidget);
#endif
aView->GetWidget()->SetTransparencyMode(viewHasTransparentContent ?
eTransparencyTransparent : eTransparencyOpaque);
aView->GetWidget()->SetTransparencyMode(mode);
return NS_OK;
}

Просмотреть файл

@ -5152,12 +5152,13 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
}
break;
case WM_DWMCOMPOSITIONCHANGED:
BroadcastMsg(mWnd, WM_DWMCOMPOSITIONCHANGED);
DispatchStandardEvent(NS_THEMECHANGED);
if (nsUXThemeData::CheckForCompositor() && mTransparencyMode == eTransparencyGlass) {
MARGINS margins = { -1, -1, -1, -1 };
nsUXThemeData::dwmExtendFrameIntoClientAreaPtr(mWnd, &margins);
}
BroadcastMsg(mWnd, WM_DWMCOMPOSITIONCHANGED);
DispatchStandardEvent(NS_THEMECHANGED);
Invalidate(PR_FALSE);
break;
}
@ -5364,7 +5365,11 @@ DWORD nsWindow::WindowStyle()
break;
case eWindowType_popup:
style = WS_OVERLAPPED | WS_POPUP;
if (mTransparencyMode == eTransparencyGlass) {
style = WS_OVERLAPPED | WS_CAPTION;
} else {
style = WS_OVERLAPPED | WS_POPUP;
}
break;
default:
@ -7868,10 +7873,7 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
return;
}
LONG style, exStyle;
style = topWindow->WindowStyle();
exStyle = topWindow->WindowExStyle();
LONG style = 0, exStyle = 0;
switch(aMode) {
case eTransparencyTransparent:
@ -7881,6 +7883,10 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
topWindow->mTransparencyMode = aMode;
break;
}
style |= topWindow->WindowStyle();
exStyle |= topWindow->WindowExStyle();
::SetWindowLongW(hWnd, GWL_STYLE, style);
::SetWindowLongW(hWnd, GWL_EXSTYLE, exStyle);