Skip to content

Commit 72c3bf0

Browse files
asurdej-comcastnmuthu973
authored andcommitted
WebInspectorUI: Fix console warning/error icon for Chromium browser
With Chromium browser both icons are displayed 300x300px while expected size is 16x16. This brakes the rest of top navigation bar Directly set image size from JS in the same way as it is done for SVG glyphs
1 parent 09ec09c commit 72c3bf0

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@
9191
color: var(--glyph-color-disabled);
9292
}
9393

94-
.navigation-bar .item.button > img {
95-
width: 100%;
96-
height: 100%;
97-
}
98-
9994
.navigation-bar .item.button.disabled > img {
10095
opacity: 0.3;
10196
}

Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,11 @@ WI.ButtonNavigationItem = class ButtonNavigationItem extends WI.NavigationItem
229229

230230
case WI.ButtonNavigationItem.ImageType.IMG: {
231231
let img = this.element.appendChild(document.createElement("img"));
232-
if (this._image)
232+
if (this._image) {
233+
img.style.width = this._imageWidth + "px";
234+
img.style.height = this._imageHeight + "px";
233235
img.src = this._image;
236+
}
234237
break;
235238
}
236239
}

0 commit comments

Comments
 (0)