Skip to content

Commit

Permalink
Fine tune button styles on menubar
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 567740980
  • Loading branch information
zzzaries authored and copybara-github committed Sep 22, 2023
1 parent d2260b7 commit e3a1905
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions plugin/trace_viewer/tf_trace_viewer/tf-trace-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@
float: left;
}

tr-ui-find-control {
/* keep consistent with menubar total height 20px */
height: 20px;
}

/* Align height of different buttons on the menubar
* tr-ui-b-toolbar-button, button.tr-ui-b-dropdown
*/
tr-ui-b-toolbar-button {
padding: 2px 0;
/* total height = 14px + 2*2padding + 1*2 border = 20px */
height: 14px;
cursor: pointer;
}

/* Align style with Detail button */
#perfetto {
background: url("https://perfetto.dev/assets/favicon.png") no-repeat left;
background-color: rgb(248, 248, 248);
background-size: 14px;
padding-left:20px;
border: 1px solid rgba(0, 0, 0, 0.5);
cursor: pointer;
font-size: 12px;
}

#analysis {
flex-flow: row nowrap;
}
Expand Down Expand Up @@ -557,8 +583,6 @@
if (!this._isOss) {
const button = tr.ui.b.createButton('Perfetto', this._perfettoButtonOnclickCallback.bind(this));
button.setAttribute('id', 'perfetto');
// Control bar has a height of 22px, using icon size 20px
button.setAttribute('style', 'background:url("https://perfetto.dev/assets/favicon.png") no-repeat left;background-size:20px;padding-left:25px;')
const hostSelector = document.getElementById("host_selector");
Polymer.dom(this._traceViewer.leftControls).insertBefore(button, hostSelector);
}
Expand Down

0 comments on commit e3a1905

Please sign in to comment.