Title: [100114] trunk/Source/WebCore
Revision
100114
Author
[email protected]
Date
2011-11-14 01:40:37 -0800 (Mon, 14 Nov 2011)

Log Message

Web Inspector: Give HTML ContextMenu a more Native look
https://bugs.webkit.org/show_bug.cgi?id=72207

Patch by Joseph Pecoraro <[email protected]> on 2011-11-14
Reviewed by Pavel Feldman.

* inspector/front-end/SoftContextMenu.js:
(.WebInspector.SoftContextMenu.prototype._createMenuItem):
Give the checkmark a class name so that it can be styled more
with CSS instead of with _javascript_.

* inspector/front-end/inspector.css:
(.soft-context-menu): tweak the border and shadow.
(.soft-context-menu-item): tweak the font size and positioning.
(.soft-context-menu-separator): tweak the whitespace.
(.soft-context-menu-item-mouse-over): solid blue for non-mac platforms.
(body.platform-mac .soft-context-menu-item-mouse-over): gradient for mac platforms.
(.soft-context-menu-item-checkmark): gray color normally.
(.soft-context-menu-item-mouse-over .soft-context-menu-item-checkmark): white on hover.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100113 => 100114)


--- trunk/Source/WebCore/ChangeLog	2011-11-14 09:27:25 UTC (rev 100113)
+++ trunk/Source/WebCore/ChangeLog	2011-11-14 09:40:37 UTC (rev 100114)
@@ -1,3 +1,24 @@
+2011-11-14  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Give HTML ContextMenu a more Native look
+        https://bugs.webkit.org/show_bug.cgi?id=72207
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/SoftContextMenu.js:
+        (.WebInspector.SoftContextMenu.prototype._createMenuItem):
+        Give the checkmark a class name so that it can be styled more
+        with CSS instead of with _javascript_.
+
+        * inspector/front-end/inspector.css:
+        (.soft-context-menu): tweak the border and shadow.
+        (.soft-context-menu-item): tweak the font size and positioning.
+        (.soft-context-menu-separator): tweak the whitespace.
+        (.soft-context-menu-item-mouse-over): solid blue for non-mac platforms.
+        (body.platform-mac .soft-context-menu-item-mouse-over): gradient for mac platforms.
+        (.soft-context-menu-item-checkmark): gray color normally.
+        (.soft-context-menu-item-mouse-over .soft-context-menu-item-checkmark): white on hover.
+
 2011-11-10  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: function remote objetct should provide access to function position in the script

Modified: trunk/Source/WebCore/inspector/front-end/SoftContextMenu.js (100113 => 100114)


--- trunk/Source/WebCore/inspector/front-end/SoftContextMenu.js	2011-11-14 09:27:25 UTC (rev 100113)
+++ trunk/Source/WebCore/inspector/front-end/SoftContextMenu.js	2011-11-14 09:40:37 UTC (rev 100114)
@@ -95,7 +95,7 @@
 
         var checkMarkElement = document.createElement("span");
         checkMarkElement.textContent = "\u2713 "; // Checkmark Unicode symbol
-        checkMarkElement.style.pointerEvents = "none";
+        checkMarkElement.className = "soft-context-menu-item-checkmark";
         if (!item.checked)
             checkMarkElement.style.opacity = "0";
 

Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (100113 => 100114)


--- trunk/Source/WebCore/inspector/front-end/inspector.css	2011-11-14 09:27:25 UTC (rev 100113)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css	2011-11-14 09:40:37 UTC (rev 100114)
@@ -2288,32 +2288,54 @@
 
 .soft-context-menu {
     position: absolute;
-    border: 1px solid rgb(180, 180, 180);
-    border-radius: 5px;
-    background-color: rgba(255, 255, 255, 0.95);
-    -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 3px 10px;
+    font-family: 'Lucida Grande', 'Helvetica', 'sans-serif';
+    border: 1px solid rgba(196, 196, 196, 0.9);
+    border-top: 1px solid rgba(196, 196, 196, 0.5);
+    border-bottom: 1px solid rgba(150, 150, 150, 0.9);
+    padding: 4px 0 4px 0;
+    border-radius: 4px;
+    background-color: white;
+    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
 }
 
 .soft-context-menu-item {
     width: 100%;
     line-height: 13px;
-    font-size: 13px;
-    padding: 4px 7px;
-    margin: 3px 0;
+    font-size: 14px;
+    border-top: 1px solid transparent;
+    border-bottom: 1px solid transparent;
+    padding: 1px 7px 3px 6px;
+    margin: 0 13px 0 0;
     white-space: nowrap;
 }
 
 .soft-context-menu-separator {
-    margin-top: 6px;
-    margin-bottom: 6px;
-    border-bottom: 1px solid rgb(180, 180, 180);
+    margin: 5px 1px 6px 1px;
+    border-bottom: 1px solid rgb(227, 227, 227);
 }
 
 .soft-context-menu-item-mouse-over {
+    border-top: 1px solid rgb(56, 121, 217);
+    border-bottom: 1px solid rgb(56, 121, 217);
     background-color: rgb(56, 121, 217);
     color: white;
 }
 
+body.platform-mac .soft-context-menu-item-mouse-over {
+    border-top: 1px solid rgb(90, 131, 236);
+    border-bottom: 1px solid rgb(18, 88, 233);
+    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(100, 140, 243)), to(rgb(36, 101, 243)));
+}
+
+.soft-context-menu-item-checkmark {
+    color: rgb(108, 108, 108);
+    pointer-events: none;
+}
+
+.soft-context-menu-item-mouse-over .soft-context-menu-item-checkmark {
+    color: white;
+}
+
 .search-view {
     position: absolute;
     top: 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to