Commit 69d5d7d6 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

2011-05-03 Pavel Feldman <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: combine toolbar icon images.
        https://bugs.webkit.org/show_bug.cgi?id=59931

        * WebCore.gypi:
        * inspector/front-end/Images/auditsIcon.png: Removed.
        * inspector/front-end/Images/consoleIcon.png: Removed.
        * inspector/front-end/Images/elementsIcon.png: Removed.
        * inspector/front-end/Images/networkIcon.png: Removed.
        * inspector/front-end/Images/profilesIcon.png: Removed.
        * inspector/front-end/Images/resourcesIcon.png: Removed.
        * inspector/front-end/Images/scriptsIcon.png: Removed.
        * inspector/front-end/Images/timelineIcon.png: Removed.
        * inspector/front-end/Images/toolbarIcons.png: Added.
        * inspector/front-end/Images/toolbarIconsSmall.png: Added.
        * inspector/front-end/WebKit.qrc:
        * inspector/front-end/inspector.css:
        (.toolbar-icon):
        (#toolbar-dropdown .toolbar-icon):
        (.toolbar-item:active .toolbar-icon):
        (#toolbar-dropdown .toolbar-item:active .toolbar-icon):
        (.toolbar-item.elements .toolbar-icon):
        (.toolbar-item.resources .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.resources .toolbar-icon):
        (.toolbar-item.network .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.network .toolbar-icon):
        (.toolbar-item.scripts .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.scripts .toolbar-icon):
        (.toolbar-item.timeline .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.timeline .toolbar-icon):
        (.toolbar-item.profiles .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.profiles .toolbar-icon):
        (.toolbar-item.audits .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.audits .toolbar-icon):
        (.toolbar-item.console .toolbar-icon):
        (#toolbar-dropdown .toolbar-item.console .toolbar-icon):
        (.status-bar-item > .glyph):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 709a76f4
2011-05-03 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: combine toolbar icon images.
https://bugs.webkit.org/show_bug.cgi?id=59931
* WebCore.gypi:
* inspector/front-end/Images/auditsIcon.png: Removed.
* inspector/front-end/Images/consoleIcon.png: Removed.
* inspector/front-end/Images/elementsIcon.png: Removed.
* inspector/front-end/Images/networkIcon.png: Removed.
* inspector/front-end/Images/profilesIcon.png: Removed.
* inspector/front-end/Images/resourcesIcon.png: Removed.
* inspector/front-end/Images/scriptsIcon.png: Removed.
* inspector/front-end/Images/timelineIcon.png: Removed.
* inspector/front-end/Images/toolbarIcons.png: Added.
* inspector/front-end/Images/toolbarIconsSmall.png: Added.
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
(.toolbar-icon):
(#toolbar-dropdown .toolbar-icon):
(.toolbar-item:active .toolbar-icon):
(#toolbar-dropdown .toolbar-item:active .toolbar-icon):
(.toolbar-item.elements .toolbar-icon):
(.toolbar-item.resources .toolbar-icon):
(#toolbar-dropdown .toolbar-item.resources .toolbar-icon):
(.toolbar-item.network .toolbar-icon):
(#toolbar-dropdown .toolbar-item.network .toolbar-icon):
(.toolbar-item.scripts .toolbar-icon):
(#toolbar-dropdown .toolbar-item.scripts .toolbar-icon):
(.toolbar-item.timeline .toolbar-icon):
(#toolbar-dropdown .toolbar-item.timeline .toolbar-icon):
(.toolbar-item.profiles .toolbar-icon):
(#toolbar-dropdown .toolbar-item.profiles .toolbar-icon):
(.toolbar-item.audits .toolbar-icon):
(#toolbar-dropdown .toolbar-item.audits .toolbar-icon):
(.toolbar-item.console .toolbar-icon):
(#toolbar-dropdown .toolbar-item.console .toolbar-icon):
(.status-bar-item > .glyph):
2011-05-03 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
......@@ -6225,7 +6225,6 @@
],
'webinspector_image_files': [
'inspector/front-end/Images/applicationCache.png',
'inspector/front-end/Images/auditsIcon.png',
'inspector/front-end/Images/back.png',
'inspector/front-end/Images/breakpointBorder.png',
'inspector/front-end/Images/breakpointConditionalBorder.png',
......@@ -6233,7 +6232,6 @@
'inspector/front-end/Images/breakpointCounterBorder.png',
'inspector/front-end/Images/checker.png',
'inspector/front-end/Images/closeButtons.png',
'inspector/front-end/Images/consoleIcon.png',
'inspector/front-end/Images/cookie.png',
'inspector/front-end/Images/database.png',
'inspector/front-end/Images/databaseTable.png',
......@@ -6251,7 +6249,6 @@
'inspector/front-end/Images/disclosureTriangleSmallRightDownBlack.png',
'inspector/front-end/Images/disclosureTriangleSmallRightDownWhite.png',
'inspector/front-end/Images/disclosureTriangleSmallRightWhite.png',
'inspector/front-end/Images/elementsIcon.png',
'inspector/front-end/Images/errorIcon.png',
'inspector/front-end/Images/errorMediumIcon.png',
'inspector/front-end/Images/errorRedDot.png',
......@@ -6265,7 +6262,6 @@
'inspector/front-end/Images/graphLabelCalloutLeft.png',
'inspector/front-end/Images/graphLabelCalloutRight.png',
'inspector/front-end/Images/localStorage.png',
'inspector/front-end/Images/networkIcon.png',
'inspector/front-end/Images/paneAddButtons.png',
'inspector/front-end/Images/paneBottomGrow.png',
'inspector/front-end/Images/paneBottomGrowActive.png',
......@@ -6275,7 +6271,6 @@
'inspector/front-end/Images/popoverBackground.png',
'inspector/front-end/Images/profileGroupIcon.png',
'inspector/front-end/Images/profileIcon.png',
'inspector/front-end/Images/profilesIcon.png',
'inspector/front-end/Images/profileSmallIcon.png',
'inspector/front-end/Images/profilesSilhouette.png',
'inspector/front-end/Images/programCounterBorder.png',
......@@ -6286,10 +6281,8 @@
'inspector/front-end/Images/resourceJSIcon.png',
'inspector/front-end/Images/resourcePlainIcon.png',
'inspector/front-end/Images/resourcePlainIconSmall.png',
'inspector/front-end/Images/resourcesIcon.png',
'inspector/front-end/Images/resourcesSizeGraphIcon.png',
'inspector/front-end/Images/resourcesTimeGraphIcon.png',
'inspector/front-end/Images/scriptsIcon.png',
'inspector/front-end/Images/scriptsSilhouette.png',
'inspector/front-end/Images/searchSmallBlue.png',
'inspector/front-end/Images/searchSmallBrightBlue.png',
......@@ -6327,7 +6320,6 @@
'inspector/front-end/Images/timelineHollowPillPurple.png',
'inspector/front-end/Images/timelineHollowPillRed.png',
'inspector/front-end/Images/timelineHollowPillYellow.png',
'inspector/front-end/Images/timelineIcon.png',
'inspector/front-end/Images/timelineBarBlue.png',
'inspector/front-end/Images/timelineBarGray.png',
'inspector/front-end/Images/timelineBarGreen.png',
......@@ -6344,6 +6336,8 @@
'inspector/front-end/Images/timelinePillPurple.png',
'inspector/front-end/Images/timelinePillRed.png',
'inspector/front-end/Images/timelinePillYellow.png',
'inspector/front-end/Images/toolbarIcons.png',
'inspector/front-end/Images/toolbarIconsSmall.png',
'inspector/front-end/Images/toolbarItemSelected.png',
'inspector/front-end/Images/trackHoriz.png',
'inspector/front-end/Images/trackVert.png',
......
......@@ -42,6 +42,15 @@ WebInspector.Toolbar = function()
}
WebInspector.Toolbar.prototype = {
set attached(attached)
{
if (attached)
this.element.addStyleClass("toolbar-small");
else
this.element.removeStyleClass("toolbar-small");
this._updateDropdownButtonAndHideDropdown();
},
resize: function()
{
this._updateDropdownButtonAndHideDropdown();
......@@ -165,6 +174,7 @@ WebInspector.ToolbarDropdown = function()
this._arrow = document.getElementById("toolbar-dropdown-arrow");
this.element = document.createElement("div");
this.element.id = "toolbar-dropdown";
this.element.className = "toolbar-small";
this._contentElement = this.element.createChild("div", "scrollable-content");
this._contentElement.tabIndex = 0;
this._contentElement.addEventListener("keydown", this._onKeyDown.bind(this), true);
......
......@@ -138,7 +138,6 @@
<file>popover.css</file>
<file>textViewer.css</file>
<file>Images/applicationCache.png</file>
<file>Images/auditsIcon.png</file>
<file>Images/back.png</file>
<file>Images/breakpointBorder.png</file>
<file>Images/breakpointConditionalBorder.png</file>
......@@ -147,7 +146,6 @@
<file>Images/checker.png</file>
<file>Images/closeButtons.png</file>
<file>Images/cookie.png</file>
<file>Images/consoleIcon.png</file>
<file>Images/database.png</file>
<file>Images/databaseTable.png</file>
<file>Images/debuggerContinue.png</file>
......@@ -164,7 +162,6 @@
<file>Images/disclosureTriangleSmallRightDownBlack.png</file>
<file>Images/disclosureTriangleSmallRightDownWhite.png</file>
<file>Images/disclosureTriangleSmallRightWhite.png</file>
<file>Images/elementsIcon.png</file>
<file>Images/errorIcon.png</file>
<file>Images/errorMediumIcon.png</file>
<file>Images/errorRedDot.png</file>
......@@ -178,7 +175,6 @@
<file>Images/graphLabelCalloutLeft.png</file>
<file>Images/graphLabelCalloutRight.png</file>
<file>Images/localStorage.png</file>
<file>Images/networkIcon.png</file>
<file>Images/paneAddButtons.png</file>
<file>Images/paneBottomGrow.png</file>
<file>Images/paneBottomGrowActive.png</file>
......@@ -188,7 +184,6 @@
<file>Images/popoverBackground.png</file>
<file>Images/profileGroupIcon.png</file>
<file>Images/profileIcon.png</file>
<file>Images/profilesIcon.png</file>
<file>Images/profileSmallIcon.png</file>
<file>Images/profilesSilhouette.png</file>
<file>Images/programCounterBorder.png</file>
......@@ -199,10 +194,8 @@
<file>Images/resourceJSIcon.png</file>
<file>Images/resourcePlainIcon.png</file>
<file>Images/resourcePlainIconSmall.png</file>
<file>Images/resourcesIcon.png</file>
<file>Images/resourcesSizeGraphIcon.png</file>
<file>Images/resourcesTimeGraphIcon.png</file>
<file>Images/scriptsIcon.png</file>
<file>Images/scriptsSilhouette.png</file>
<file>Images/searchSmallBlue.png</file>
<file>Images/searchSmallBrightBlue.png</file>
......@@ -249,7 +242,6 @@
<file>Images/timelineHollowPillPurple.png</file>
<file>Images/timelineHollowPillRed.png</file>
<file>Images/timelineHollowPillYellow.png</file>
<file>Images/timelineIcon.png</file>
<file>Images/timelinePillBlue.png</file>
<file>Images/timelinePillGray.png</file>
<file>Images/timelinePillGreen.png</file>
......@@ -257,6 +249,8 @@
<file>Images/timelinePillPurple.png</file>
<file>Images/timelinePillRed.png</file>
<file>Images/timelinePillYellow.png</file>
<file>Images/toolbarIcons.png</file>
<file>Images/toolbarIconsSmall.png</file>
<file>Images/toolbarItemSelected.png</file>
<file>Images/trackHoriz.png</file>
<file>Images/trackVert.png</file>
......
......@@ -131,22 +131,22 @@ body.attached.inactive #toolbar {
display: inline-block;
width: 32px;
height: 32px;
-webkit-background-size: 100% auto;
background-image: url(Images/toolbarIcons.png);
}
body.attached .toolbar-icon,
#toolbar-dropdown .toolbar-icon {
.toolbar-small .toolbar-icon {
width: 24px;
height: 24px;
vertical-align: middle;
background-image: url(Images/toolbarIconsSmall.png);
}
.toolbar-item:active .toolbar-icon {
background-position: 0 32px;
background-position-y: 32px;
}
body.attached .toolbar-item:active .toolbar-icon {
background-position: 0 24px;
.toolbar-small .toolbar-item:active .toolbar-icon {
background-position-y: 24px;
}
.toolbar-label {
......@@ -159,8 +159,7 @@ body.attached .toolbar-item:active .toolbar-icon {
text-shadow: none;
}
body.attached .toolbar-label,
#toolbar-dropdown .toolbar-label {
.toolbar-small .toolbar-label {
display: inline-block;
margin-left: 3px;
position: relative;
......@@ -253,10 +252,6 @@ body.detached.platform-mac-snowleopard #toolbar-dropdown {
margin-right: 0.5em;
}
#toolbar-dropdown .toolbar-item:active .toolbar-icon {
background-position: 0 24px;
}
.scrollable-content {
position: static;
height: 100%;
......@@ -313,35 +308,63 @@ body.attached #search {
}
.toolbar-item.elements .toolbar-icon {
background-image: url(Images/elementsIcon.png);
background-position-x: 0;
}
.toolbar-item.resources .toolbar-icon {
background-image: url(Images/resourcesIcon.png);
background-position-x: -32px;
}
.toolbar-small .toolbar-item.resources .toolbar-icon {
background-position-x: -24px;
}
.toolbar-item.network .toolbar-icon {
background-image: url(Images/networkIcon.png);
background-position-x: -64px;
}
.toolbar-small .toolbar-item.network .toolbar-icon {
background-position-x: -48px;
}
.toolbar-item.scripts .toolbar-icon {
background-image: url(Images/scriptsIcon.png);
background-position-x: -96px;
}
.toolbar-small .toolbar-item.scripts .toolbar-icon {
background-position-x: -72px;
}
.toolbar-item.timeline .toolbar-icon {
background-image: url(Images/timelineIcon.png);
background-position-x: -128px;
}
.toolbar-small .toolbar-item.timeline .toolbar-icon {
background-position-x: -96px;
}
.toolbar-item.profiles .toolbar-icon {
background-image: url(Images/profilesIcon.png);
background-position-x: -160px;
}
.toolbar-small .toolbar-item.profiles .toolbar-icon {
background-position-x: -120px;
}
.toolbar-item.audits .toolbar-icon {
background-image: url(Images/auditsIcon.png);
background-position-x: -192px;
}
.toolbar-small .toolbar-item.audits .toolbar-icon {
background-position-x: -144px;
}
.toolbar-item.console .toolbar-icon {
background-image: url(Images/consoleIcon.png);
background-position-x: -224px;
}
.toolbar-small .toolbar-item.console .toolbar-icon {
background-position-x: -168px;
}
#close-button-left, #close-button-right {
......@@ -522,7 +545,7 @@ select.status-bar-item:active {
}
.status-bar-item > .glyph {
-webkit-mask-image: url(Images/statusbarButtonGlyphs.png);
-webkit-mask-image: url(Images/statusBarButtonGlyphs.png);
}
#dock-status-bar-item .glyph {
......
......@@ -28,12 +28,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Keep this ; so that concatenated version of the script worked.
;(function preloadImages()
{
(new Image()).src = "Images/statusbarButtonGlyphs.png";
})();
var WebInspector = {
resources: {},
missingLocalizedStrings: {},
......@@ -205,6 +199,9 @@ var WebInspector = {
// This may be called before onLoadedDone, hence the bulk of inspector objects may
// not be created yet.
if (WebInspector.toolbar)
WebInspector.toolbar.attached = x;
if (WebInspector.searchController)
WebInspector.searchController.updateSearchLabel();
},
......@@ -444,6 +441,7 @@ WebInspector.doLoadedDone = function()
this._createPanels();
this._panelHistory = new WebInspector.PanelHistory();
this.toolbar = new WebInspector.Toolbar();
this.toolbar.attached = WebInspector.attached;
this.panelOrder = [];
for (var panelName in this.panels)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment