-
{{traces[traceKey].name}} configuration
-
-
-
{{enableConfig.name}}
-
-
+
{{selectionConfig.name}}
-
- {{ option }}
-
+ *ngFor="let selectionConfig of traceSelectionConfigs(traces[traceKey])"
+ class="config-selection"
+ appearance="fill">
+ {{selectionConfig.name}}
+
+ {{ option }}
+
-
+
`,
styles: [
`
- .checkboxes {
- columns: 3 10em;
- padding: 0;
+ .card-block {
+ margin: 15px;
}
- .config-opt {
- position: relative;
- display: inline-block;
+ .checkboxes {
+ padding: 0;
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ }
+ .config-selection {
+ margin: 0 5px;
}
`
]
diff --git a/tools/winscope-ng/src/app/components/trace_view.component.ts b/tools/winscope-ng/src/app/components/trace_view.component.ts
index 914f283f0..665322554 100644
--- a/tools/winscope-ng/src/app/components/trace_view.component.ts
+++ b/tools/winscope-ng/src/app/components/trace_view.component.ts
@@ -27,54 +27,47 @@ import { Viewer } from "viewers/viewer";
@Component({
selector: "trace-view",
template: `
-
-
-
-
-
+
+
+
`,
styles: [
`
- :host /deep/ .trace-view-header .mat-card-header-text {
- margin: 0;
- }
-
.header-items-wrapper {
width: 100%;
- vertical-align: middle;
- position: relative;
- display: inline-block;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
}
.viewer-nav-bar {
- vertical-align: middle;
- display: inline-block;
+ height: 100%;
+ }
+
+ .trace-view-content {
+ height: 0;
+ flex-grow: 1;
}
.save-btn {
- float: right;
- vertical-align: middle;
- border: none;
height: 100%;
- margin: 0;
- display: inline-block;
}
`
]
diff --git a/tools/winscope-ng/src/app/components/upload_traces.component.ts b/tools/winscope-ng/src/app/components/upload_traces.component.ts
index edd702835..6f54e1b2d 100644
--- a/tools/winscope-ng/src/app/components/upload_traces.component.ts
+++ b/tools/winscope-ng/src/app/components/upload_traces.component.ts
@@ -24,98 +24,70 @@ import { ParserError } from "parsers/parser_factory";
@Component({
selector: "upload-traces",
template: `
-
Upload Traces
-
-
-
- 0"
- >
-
-
- {{TRACE_INFO[trace.type].icon}}
- {{trace.name}} ({{TRACE_INFO[trace.type].name}})
-
-
-
-
- Drag your .winscope file(s) or click to upload
-
+ Upload Traces
+
+
+
+
0" class="uploaded-files">
+
+ {{TRACE_INFO[trace.type].icon}}
+ {{trace.name}} ({{TRACE_INFO[trace.type].name}})
+
+
+
+
Drag your .winscope file(s) or click to upload
+
- 0">
-
-
-
-
-
+ 0">
+
+
+
+
+
`,
styles: [
`
.drop-box {
- outline: 2px dashed var(--default-border);
- outline-offset: -10px;
- background: white;
- padding: 10px 10px 10px 10px;
height: 400px;
- position: relative;
- cursor: pointer;
+ padding: 10px;
display: flex;
flex-direction: column;
overflow: auto;
- text-align: center;
- align-items: center;
- justify-items: center;
- vertical-align: middle;
- }
- .drop-info {
- font-weight: normal;
- pointer-events: none;
- margin: auto;
- }
- #inputfile {
- margin: auto;
+ outline: 2px dashed var(--default-border);
+ outline-offset: -10px;
+ cursor: pointer;
}
.uploaded-files {
- text-align: left;
- height: 400px;
- overflow: auto;
- width: 100%;
- }
- .listed-file {
- width: 100%;
- position: relative;
- display: inline-block;
height: 100%;
width: 100%;
- }
- .listed-file-item {
- position: relative;
- display: inline-block;
- vertical-align: middle;
- align-items: center;
+ overflow: auto;
}
.close-btn {
- float: right;
+ margin-left: auto;
+ }
+ .drop-info {
+ pointer-events: none;
+ margin: auto;
}
`
]
diff --git a/tools/winscope-ng/src/app/components/web_adb.component.ts b/tools/winscope-ng/src/app/components/web_adb.component.ts
index 08a6ca9d1..3f1f59a14 100644
--- a/tools/winscope-ng/src/app/components/web_adb.component.ts
+++ b/tools/winscope-ng/src/app/components/web_adb.component.ts
@@ -18,19 +18,23 @@ import {Component} from "@angular/core";
@Component({
selector: "web-adb",
template: `
-
-
-
Click the button below to follow instructions in the Chrome pop-up.
-
Selecting a device will kill all existing ADB connections.
-
-
-
-
+
+
Click the button below to follow instructions in the Chrome pop-up.
+
Selecting a device will kill all existing ADB connections.
+
`,
- styles: [".icon-message {vertical-align: middle;}"]
+ styles: [
+ `
+ .text-icon-wrapper {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ }
+ `
+ ]
})
export class WebAdbComponent {
adbDevice = null;
diff --git a/tools/winscope-ng/src/material-theme.scss b/tools/winscope-ng/src/material-theme.scss
new file mode 100644
index 000000000..041a4d84b
--- /dev/null
+++ b/tools/winscope-ng/src/material-theme.scss
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@use '@angular/material' as mat;
+
+@import 'https://fonts.googleapis.com/icon?family=Material+Icons';
+@import '//fonts.googleapis.com/css2?family=Google+Sans';
+
+$primary: mat.define-palette(mat.$blue-palette, 700);
+$accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
+
+$typography: mat.define-typography-config(
+ $font-family: 'Roboto, sans-serif'
+);
+
+@include mat.core($typography);
+
+$theme: mat.define-light-theme((
+ color: (
+ primary: $primary,
+ accent: $accent,
+ )
+));
+
+@include mat.core-theme($theme);
+
+@include mat.button-theme($theme);
+@include mat.card-theme($theme);
+@include mat.checkbox-theme($theme);
+@include mat.form-field-theme($theme);
+@include mat.grid-list-theme($theme);
+@include mat.icon-theme($theme);
+@include mat.input-theme($theme);
+@include mat.list-theme($theme);
+@include mat.progress-bar-theme($theme);
+@include mat.progress-spinner-theme($theme);
+@include mat.radio-theme($theme);
+@include mat.select-theme($theme);
+@include mat.slider-theme($theme);
+@include mat.snack-bar-theme($theme);
+@include mat.tabs-theme($theme);
+@include mat.tooltip-theme($theme);
+@include mat.toolbar-theme($theme);
diff --git a/tools/winscope-ng/src/styles.css b/tools/winscope-ng/src/styles.css
index 821ececfc..7f4ca53c6 100644
--- a/tools/winscope-ng/src/styles.css
+++ b/tools/winscope-ng/src/styles.css
@@ -13,95 +13,46 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@import "~@angular/material/prebuilt-themes/indigo-pink.css";
-@import 'https://fonts.googleapis.com/icon?family=Material+Icons';
-@import '//fonts.googleapis.com/css2?family=Google+Sans';
-:root {
+html {
+ height: 100%;
+ width: 100%;
--default-border: #DADCE0;
- --default-blue: #1A73E8;
}
-:root .mat-stroked-button {
- margin: 10px;
+body {
+ margin: 0;
+ height: 100%;
+ width: 100%;
}
-.mat-snack-bar-container, .close-snackbar {
- color: white;
-}
-
-.mat-snack-bar-container .flex {
- display: inline-flex;
- align-items: baseline;
- position: relative;
- vertical-align: middle;
- justify-content: space-between;
-}
-
-.mat-snack-bar-container .data {
- display: block;
-}
-
-.mat-snack-bar-container .message-wrapper, .mat-snack-bar-container .close {
- vertical-align: middle;
- position: relative;
- display: inline-block;
-}
-
-#app-title {
- font-family: 'Google Sans', sans-serif;
- font-size: 30;
-}
-
-#title {
- font-family: 'Google Sans', sans-serif;
- font-size: 18px;
-}
-
-.labels-canvas div {
- font-family: 'Google Sans', sans-serif;
-}
-
-h1, p, span {
- font-family: 'Google Sans Text', sans-serif;
- font-weight: 400;
-}
-
-button span {
- font-family: 'Google Sans', sans-serif;
- font-weight: 500;
-}
-
-button {
- cursor: pointer;
-}
-
-.homepage-card {
- border: 1px solid var(--default-border);
- width: 50%;
- height: 48rem;
- display: flex;
- overflow: auto;
- margin: 10px;
-}
-
-.homepage-card mat-card-content {
+app-root {
+ height: 100%;
+ width: 100%;
display: flex;
flex-direction: column;
- overflow: auto;
}
-.trace-card {
- padding: 0 !important;
- margin: 0 !important;
- border: none;
- box-shadow: none !important;
- height: 100%;
- overflow: auto;
- display: flex;
+.mat-headline, .mat-title, .mat-subheading-2, .mat-body-1, .mat-body-2, .mat-small {
+ margin: 0;
+}
+
+button.mat-raised-button {
margin: 10px;
}
+button.mat-stroked-button {
+ margin: 10px;
+}
+
+mat-checkbox {
+ margin-left: 12px;
+}
+
+mat-icon {
+ margin: 5px;
+}
+
.card-grid {
width: 100%;
height: 100%;
@@ -109,159 +60,3 @@ button {
flex-direction: row;
overflow: auto;
}
-
-mat-checkbox {
- margin-left: 5px;
-}
-
-
-.mat-form-field {
- margin: 2px;
- padding: 0;
-}
-
-mat-icon {
- margin: 5px;
-}
-
-.icon-message, .adb-icon, .adb-info {
- vertical-align: middle;
-}
-
-.file-icon {
- vertical-align: middle;
- outline: none;
- background: none;
-}
-
-.card-block {
- margin: 15px;
-}
-
-button.mat-raised-button {
- background-color: var(--default-blue);
- color: white;
- margin: 10px;
-}
-
-button.mat-raised-button span {
- font-weight: 500;
-}
-
-.tab.inactive {
- background-color:white;
- color: black;
-}
-
-.input {
- opacity: 0;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- position: absolute;
-}
-
-.subtitle {
- font-size: 16px;
- line-height: 24px;
- font-weight: 500;
-}
-
-.file-input-prompt {
- color: white;
- background-color: var(--default-blue);
- border-radius: 21.5px;
- cursor: pointer;
-}
-
-.viewers.hide {
- display: none !important;
-}
-
-
-.icon-button {
- background: none;
- border: none;
- display: inline-block;
- vertical-align: middle;
-}
-
-#trace-collection-config button {
- background: none;
- box-shadow: none;
- color: var(--default-blue);
-}
-
-.device-choice button {
- border: none;
-}
-
-.trace-section button, .dump-section button {
- border: 1px solid var(--default-border);
-}
-
-/* changing colors of pre-built theme */
-.mat-accent .mat-option.mat-selected:not(.mat-option-disabled){color: var(--default-blue)}
-.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-indeterminate,.mat-accent .mat-pseudo-checkbox-checked,.mat-accent .mat-pseudo-checkbox-indeterminate{background:var(--default-blue)}
-.mat-badge-accent .mat-badge-content{background:var(--default-blue);}
-.mat-button.mat-accent,.mat-icon-button.mat-accent,.mat-stroked-button.mat-accent, .mat-stroked-button{color:var(--default-blue)}
-.mat-button.mat-accent .mat-button-focus-overlay,.mat-icon-button.mat-accent .mat-button-focus-overlay,.mat-stroked-button.mat-accent .mat-button-focus-overlay{background-color:var(--default-blue)}
-.mat-flat-button.mat-accent,.mat-raised-button.mat-accent,.mat-fab.mat-accent,.mat-mini-fab.mat-accent{background-color:var(--default-blue)}
-.mat-checkbox-checked.mat-accent .mat-checkbox-background{background-color:var(--default-blue)}
-.mat-checkbox-checked:not(.mat-checkbox-disabled).mat-accent .mat-ripple-element,.mat-checkbox:active:not(.mat-checkbox-disabled).mat-accent .mat-ripple-element{background:var(--default-blue)}
-.mat-chip.mat-standard-chip.mat-chip-selected.mat-accent{background-color:var(--default-blue);}
-.mat-datepicker-content.mat-accent .mat-calendar-body-selected{background-color:var(--default-blue);}
-.mat-datepicker-toggle-active.mat-accent{color:var(--default-blue)}
-.mat-form-field.mat-focused .mat-form-field-label.mat-accent{color:var(--default-blue)}
-.mat-focused .mat-form-field-required-marker{color:var(--default-blue)}
-.mat-form-field.mat-focused .mat-form-field-ripple.mat-accent{background-color:var(--default-blue)}
-.mat-form-field-type-mat-native-select.mat-focused:not(.mat-form-field-invalid).mat-accent .mat-form-field-infix::after{color:var(--default-blue)}
-.mat-form-field-appearance-outline.mat-focused.mat-accent .mat-form-field-outline-thick{color:var(--default-blue)}
-.mat-icon.mat-accent{color:var(--default-blue)}
-.mat-form-field.mat-accent .mat-input-element{caret-color:var(--default-blue)}
-.mat-progress-bar.mat-accent .mat-progress-bar-fill::after{background-color:var(--default-blue)}
-.mat-progress-spinner.mat-accent circle,.mat-spinner.mat-accent circle{stroke:var(--default-blue)}
-.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:var(--default-blue)}
-.mat-radio-button.mat-accent .mat-radio-inner-circle,.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-persistent-ripple,.mat-radio-button.mat-accent:active .mat-radio-persistent-ripple{background-color:var(--default-blue)}
-.mat-form-field.mat-focused.mat-accent .mat-select-arrow{color:var(--default-blue)}
-.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:var(--default-blue)}
-.mat-slide-toggle.mat-checked .mat-ripple-element{background-color:var(--default-blue)}
-.mat-slider.mat-accent .mat-slider-track-fill,.mat-slider.mat-accent .mat-slider-thumb,.mat-slider.mat-accent .mat-slider-thumb-label{background-color:var(--default-blue)}
-.mat-step-header.mat-accent .mat-step-icon-selected,.mat-step-header.mat-accent .mat-step-icon-state-done,.mat-step-header.mat-accent .mat-step-icon-state-edit{background-color:var(--default-blue);}
-.mat-tab-group.mat-accent .mat-ink-bar,.mat-tab-nav-bar.mat-accent .mat-ink-bar{background-color:var(--default-blue)}
-.mat-tab-group.mat-background-accent>.mat-tab-header,.mat-tab-group.mat-background-accent>.mat-tab-link-container,.mat-tab-group.mat-background-accent>.mat-tab-header-pagination,.mat-tab-nav-bar.mat-background-accent>.mat-tab-header,.mat-tab-nav-bar.mat-background-accent>.mat-tab-link-container,.mat-tab-nav-bar.mat-background-accent>.mat-tab-header-pagination{background-color:var(--default-blue)}
-.mat-toolbar.mat-accent{background:var(--default-blue);}
-.mat-simple-snackbar-action{color:var(--default-blue)}
-
-/* changing fonts of pre-built theme */
-.mat-h1,.mat-headline,.mat-typography .mat-h1,.mat-typography .mat-headline,.mat-typography h1{font:400 24px/32px "Google Sans", sans-serif;letter-spacing:normal;margin:0 0 16px}
-.mat-h2,.mat-title,.mat-typography .mat-h2,.mat-typography .mat-title,.mat-typography h2{font:500 20px/32px "Google Sans", sans-serif;letter-spacing:normal;margin:0 0 16px}
-.mat-h3,.mat-subheading-2,.mat-typography .mat-h3,.mat-typography .mat-subheading-2,.mat-typography h3{font:400 16px/28px "Google Sans", sans-serif;letter-spacing:normal;margin:0 0 16px}
-.mat-h4,.mat-subheading-1,.mat-typography .mat-h4,.mat-typography .mat-subheading-1,.mat-typography h4{font:400 15px/24px "Google Sans", sans-serif;letter-spacing:normal;margin:0 0 16px}
-.mat-h5,.mat-typography .mat-h5,.mat-typography h5{font:400 calc(14px * 0.83)/20px "Google Sans", sans-serif;margin:0 0 12px}
-.mat-h6,.mat-typography .mat-h6,.mat-typography h6{font:400 calc(14px * 0.67)/20px "Google Sans", sans-serif;margin:0 0 12px}
-.mat-body-strong,.mat-body-2,.mat-typography .mat-body-strong,.mat-typography .mat-body-2{font:500 14px/24px "Google Sans Text", sans-serif;letter-spacing:normal}
-.mat-body,.mat-body-1,.mat-typography .mat-body,.mat-typography .mat-body-1,.mat-typography{font-family:"Google Sans Text", sans-serif;}
-.mat-small,.mat-caption,.mat-typography .mat-small,.mat-typography .mat-caption{font:400 12px/20px "Google Sans Text", sans-serif;letter-spacing:normal}
-.mat-display-4,.mat-typography .mat-display-4{font:300 112px/112px "Google Sans", sans-serif;letter-spacing:-0.05em;margin:0 0 56px}
-.mat-display-3,.mat-typography .mat-display-3{font:400 56px/56px "Google Sans", sans-serif;letter-spacing:-0.02em;margin:0 0 64px}
-.mat-display-2,.mat-typography .mat-display-2{font:400 45px/48px "Google Sans", sans-serif;letter-spacing:-0.005em;margin:0 0 64px}
-.mat-display-1,.mat-typography .mat-display-1{font:400 34px/40px "Google Sans", sans-serif;letter-spacing:normal;margin:0 0 64px}
-.mat-select-trigger{font-family:"Google Sans", sans-serif;}
-.mat-radio-button{font-family:"Google Sans", sans-serif}
-.mat-select{font-family:"Google Sans", sans-serif}
-.mat-slide-toggle-content{font-family:"Google Sans", sans-serif}
-.mat-slider-thumb-label-text{font-family:"Google Sans", sans-serif}
-.mat-stepper-vertical,.mat-stepper-horizontal{font-family:"Google Sans", sans-serif}
-.mat-tab-group{font-family:"Google Sans", sans-serif}
-.mat-tab-label,.mat-tab-link{font-family:"Google Sans", sans-serif; font-weight: 500;}
-.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:"Google Sans", sans-serif;}
-.mat-tooltip{font-family:"Google Sans", sans-serif;}
-.mat-list-item{font-family:"Google Sans", sans-serif}
-.mat-list-option{font-family:"Google Sans", sans-serif}
-.mat-list-base .mat-subheader{font-family:"Google Sans", sans-serif;}
-.mat-list-base[dense] .mat-subheader{font-family:"Google Sans", sans-serif;}
-.mat-option{font-family:"Google Sans", sans-serif;}
-.mat-optgroup-label{font-family:"Google Sans", sans-serif}
-.mat-simple-snackbar{font-family:"Google Sans", sans-serif;}
diff --git a/tools/winscope-ng/src/viewers/components/coordinates_table.component.ts b/tools/winscope-ng/src/viewers/components/coordinates_table.component.ts
index c9274f065..2d2730123 100644
--- a/tools/winscope-ng/src/viewers/components/coordinates_table.component.ts
+++ b/tools/winscope-ng/src/viewers/components/coordinates_table.component.ts
@@ -18,44 +18,54 @@ import { Component, Input } from "@angular/core";
@Component({
selector: "coordinates-table",
template: `
-
null
-
-
-
-
- | {{ coordinates.left }} |
- {{ coordinates.top }} |
- {{ coordinates.right }} |
- {{ coordinates.bottom }} |
-
-
-
+
null
+
+
+
+ |
+ {{ coordinates.left }}
+ |
+
+ {{ coordinates.top }}
+ |
+
+ {{ coordinates.right }}
+ |
+
+ {{ coordinates.bottom }}
+ |
+
+
`,
styles: [
`
- .coord-null-value {
- color: rgba(0, 0, 0, 0.75);
+ .table {
+ width: 100%;
+ border-collapse: collapse;
}
- .coord-table-wrapper {
- margin-left: 10px;
- display: inline-flex;
- padding: 3px 0px;
+ .table td {
+ padding: 1px 5px;
+ border: 1px solid var(--default-border);
+ text-align: center;
+ overflow-wrap: anywhere;
}
- .coord-table-wrapper td, .coord-table-wrapper th {
- height: auto;
- border: 1px solid ar(--default-border);
- }
-
- .coord-table-wrapper .header-row td {
+ .header-row td {
color: gray;
- font-weight: 600;
}
`
],
diff --git a/tools/winscope-ng/src/viewers/components/hierarchy.component.ts b/tools/winscope-ng/src/viewers/components/hierarchy.component.ts
index 1090a2a6d..d4b0f5b40 100644
--- a/tools/winscope-ng/src/viewers/components/hierarchy.component.ts
+++ b/tools/winscope-ng/src/viewers/components/hierarchy.component.ts
@@ -25,10 +25,10 @@ import { TableProperties } from "viewers/common/table_properties";
@Component({
selector: "hierarchy-view",
template: `
-