Bladeren bron

Improve Debugger styling, break long source strings and avoid gap around log resize handle

Michael Ragazzon 1 jaar geleden
bovenliggende
commit
6a8385f7ad
3 gewijzigde bestanden met toevoegingen van 16 en 19 verwijderingen
  1. 11 11
      Source/Debugger/CommonSource.h
  2. 2 8
      Source/Debugger/ElementInfo.cpp
  3. 3 0
      Source/Debugger/InfoSource.h

+ 11 - 11
Source/Debugger/CommonSource.h

@@ -59,7 +59,7 @@ h1
 h2
 {
 	background-color: #ddd;
-	border-width: 1px 0px;
+	border-width: 1dp 0px;
 	border-color: #888;
 }
 h3
@@ -78,7 +78,7 @@ handle#position_handle
 	top: 0;
 	right: 0;
 	bottom: 0;
-	left: 0; 
+	left: 0;
 }
 h1 .button
 {
@@ -92,7 +92,7 @@ div#close_button
 	width: 18dp;
 	color: black;
 	background-color: #ddd;
-	border-width: 1px;
+	border-width: 1dp;
 	border-color: #666;
 	text-align: center;
 }
@@ -113,7 +113,7 @@ div#content
 	background: white;
 	border-width: 2dp;
 	border-color: #888;
-	border-top-width: 0px;
+	border-top-width: 0;
 }
 .error
 {
@@ -142,12 +142,12 @@ div#content
 scrollbarvertical
 {
 	width: 16dp;
-	scrollbar-margin: 16px;
+	scrollbar-margin: 16dp;
 }
 scrollbarhorizontal
 {
 	height: 16dp;
-	scrollbar-margin: 16px;
+	scrollbar-margin: 16dp;
 }
 scrollbarvertical slidertrack,
 scrollbarhorizontal slidertrack
@@ -157,12 +157,12 @@ scrollbarhorizontal slidertrack
 }
 scrollbarvertical slidertrack
 {
-	border-left-width: 1px;
+	border-left-width: 1dp;
 }
 scrollbarhorizontal slidertrack
 {
 	height: 15dp;
-	border-top-width: 1px;
+	border-top-width: 1dp;
 }
 scrollbarvertical sliderbar,
 scrollbarhorizontal sliderbar
@@ -172,13 +172,13 @@ scrollbarhorizontal sliderbar
 }
 scrollbarvertical sliderbar
 {
-	border-width: 1px 0px;
+	border-width: 1dp 0;
 	margin-left: 1dp;
 }
 scrollbarhorizontal sliderbar
 {
 	height: 15dp;
-	border-width: 0px 1px;
+	border-width: 0 1dp;
 	margin-top: 1dp;
 }
 scrollbarcorner
@@ -190,7 +190,7 @@ handle#size_handle
 	position: absolute;
 	width: 16dp;
 	height: 16dp;
-	bottom: -2dp;
+	bottom: 0dp;
 	right: 2dp;
 	background-color: #888;
 }

+ 2 - 8
Source/Debugger/ElementInfo.cpp

@@ -495,13 +495,7 @@ void ElementInfo::UpdateSourceElement()
 		if (source_element != nullptr)
 			BuildElementPropertiesRML(properties, source_element, source_element);
 
-		if (properties.empty())
-		{
-			while (properties_content->HasChildNodes())
-				properties_content->RemoveChild(properties_content->GetChild(0));
-			properties_rml.clear();
-		}
-		else if (properties != properties_rml)
+		if (properties != properties_rml)
 		{
 			properties_content->SetInnerRML(properties);
 			properties_rml = std::move(properties);
@@ -704,7 +698,7 @@ void ElementInfo::BuildElementPropertiesRML(String& property_rml, Element* eleme
 					String str_line_number;
 					TypeConverter<int, String>::Convert(source->line_number, str_line_number);
 					property_rml += "<h3>" + source->rule_name + "</h3>";
-					property_rml += "<h4>" + source->path + " : " + str_line_number + "</h4>";
+					property_rml += "<h4><span class='break-all'>" + source->path + "</span> : " + str_line_number + "</h4>";
 				}
 				else
 				{

+ 3 - 0
Source/Debugger/InfoSource.h

@@ -118,6 +118,9 @@ div#title-content em {
 p.non_dom {
 	font-style: italic;
 }
+.break-all {
+	word-break: break-all;
+}
 )RCSS";
 
 static const char* info_rml = R"RML(