Explorar el Código

Inspector: Fix panel buttons on mobile (#31958)

sunag hace 3 meses
padre
commit
3f86d3246b
Se han modificado 2 ficheros con 16 adiciones y 2 borrados
  1. 1 1
      examples/jsm/inspector/ui/Profiler.js
  2. 15 1
      examples/jsm/inspector/ui/Style.js

+ 1 - 1
examples/jsm/inspector/ui/Profiler.js

@@ -44,7 +44,7 @@ export class Profiler {
 		this.tabsContainer.className = 'profiler-tabs';
 
 		const controls = document.createElement( 'div' );
-		controls.style.display = 'flex';
+		controls.className = 'profiler-controls';
 
 		this.maximizeBtn = document.createElement( 'button' );
 		this.maximizeBtn.id = 'maximize-btn';

+ 15 - 1
examples/jsm/inspector/ui/Style.js

@@ -137,12 +137,26 @@ export class Style {
 	flex-shrink: 0;
 	justify-content: space-between;
 	align-items: stretch;
+
+	overflow-x: auto;
+	overflow-y: hidden;
+	width: calc(100% - 89px);
 }
 
 .profiler-tabs {
 	display: flex;
 }
 
+.profiler-controls {
+	display: flex;
+	position: absolute;
+	right: 0;
+	top: 0;
+	height: 38px;
+	background: var(--profiler-header);
+	border-bottom: 1px solid var(--profiler-border);
+}
+
 .tab-btn {
 	background: transparent;
 	border: none;
@@ -391,7 +405,7 @@ export class Style {
 .graph-svg {
 	width: 100%;
 	height: 80px;
-	background-color: #2a2a33;
+	background-color: var(--profiler-header);
 	border: 1px solid var(--profiler-border);
 	border-radius: 4px;
 }

粤ICP备19079148号