Skip to content

Commit 645c968

Browse files
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 b19f56a commit 645c968

2 files changed

Lines changed: 2 additions & 5 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ WI.ButtonNavigationItem = class ButtonNavigationItem extends WI.NavigationItem
226226

227227
case WI.ButtonNavigationItem.ImageType.IMG: {
228228
let img = this.element.appendChild(document.createElement("img"));
229+
img.style.width = this._imageWidth + "px";
230+
img.style.height = this._imageHeight + "px";
229231
img.src = this._image;
230232
break;
231233
}

0 commit comments

Comments
 (0)