Skip to content

Commit

Permalink
Improve Debugger styling, break long source strings and avoid gap aro…
Browse files Browse the repository at this point in the history
…und log resize handle
  • Loading branch information
mikke89 committed Jul 7, 2024
1 parent 7805209 commit 6a8385f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
22 changes: 11 additions & 11 deletions Source/Debugger/CommonSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ h1
h2
{
background-color: #ddd;
border-width: 1px 0px;
border-width: 1dp 0px;
border-color: #888;
}
h3
Expand All @@ -78,7 +78,7 @@ handle#position_handle
top: 0;
right: 0;
bottom: 0;
left: 0;
left: 0;
}
h1 .button
{
Expand All @@ -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;
}
Expand All @@ -113,7 +113,7 @@ div#content
background: white;
border-width: 2dp;
border-color: #888;
border-top-width: 0px;
border-top-width: 0;
}
.error
{
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -190,7 +190,7 @@ handle#size_handle
position: absolute;
width: 16dp;
height: 16dp;
bottom: -2dp;
bottom: 0dp;
right: 2dp;
background-color: #888;
}
Expand Down
10 changes: 2 additions & 8 deletions Source/Debugger/ElementInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
{
Expand Down
3 changes: 3 additions & 0 deletions Source/Debugger/InfoSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6a8385f

Please sign in to comment.