ui: Added on-screen search feature (issue #79)

* Use menu action "Edit -> Find in View" or Ctrl + D
* UI displayed as search bar at bottom of main window
* Hide search bar with ECS or close button
* Entering a query searches in name of graph nodes and code contents of code view
* Use Enter to iterate through matches, well move match into view in graph and code view
* Checkboxes allow for adding/removing results for certain views
* Create Bookmark shortcut is now CTRL + S

bug id = 79
This commit is contained in:
Eberhard Graether
2017-09-19 14:00:40 +02:00
parent 4731f379f4
commit 95ef8c3eec
64 changed files with 1642 additions and 174 deletions
+38 -8
View File
@@ -181,7 +181,7 @@
<fill>#FFFF0000</fill>
</focus>
</error>
<fulltext>
<fulltext_search>
<normal>
<fill>#C2AFEF</fill>
<text>#3D3D3D</text>
@@ -189,7 +189,17 @@
<focus>
<fill>#987CEA</fill>
</focus>
</fulltext>
</fulltext_search>
<screen_search>
<normal>
<border>transparent</border>
<fill>#D2FA6E</fill>
<text>#262626</text>
</normal>
<focus>
<fill>#FA6EF3</fill>
</focus>
</screen_search>
</annotation>
</snippet>
</code>
@@ -436,6 +446,14 @@
</aggregation>
</edge>
</graph>
<tab>
<background>#494949</background>
<active>#D4D4D4</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
<table>
<background>#494949</background>
<table>#D4D4D4</table>
@@ -452,10 +470,22 @@
<active>#7B7B7B</active>
</table_line_2>
</table>
<tab>
<background>#494949</background>
<active>#D4D4D4</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
<screen_search>
<background>#808080</background>
<box>
<background>#494949</background>
<text>#D4D4D4</text>
<match_label>#A0A0A0</match_label>
</box>
<filter>white</filter>
<button>
<normal>#494949</normal>
<hover>#606060</hover>
<press>#707070</press>
<disabled>#494949</disabled>
<icon>white</icon>
<icon_disabled>#666666</icon_disabled>
</button>
</screen_search>
</config>
+32 -5
View File
@@ -179,7 +179,7 @@
<fill>#CCFF0000</fill>
</focus>
</error>
<fulltext>
<fulltext_search>
<normal>
<fill>#C7C7E2</fill>
<text>#000000</text>
@@ -187,7 +187,17 @@
<focus>
<fill>#ABABDD</fill>
</focus>
</fulltext>
</fulltext_search>
<screen_search>
<normal>
<border>transparent</border>
<fill>#8ADBBC</fill>
<text>#000000</text>
</normal>
<focus>
<fill>#DB97C2</fill>
</focus>
</screen_search>
</annotation>
</snippet>
</code>
@@ -397,15 +407,14 @@
</aggregation>
</edge>
</graph>
<error>
<background>white</background>
</error>
<tab>
<background>white</background>
<active>black</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
<table>
<background>white</background>
<table>#aaa</table>
@@ -422,4 +431,22 @@
<active>grey</active>
</table_line_2>
</table>
<screen_search>
<background>#E0E0E0</background>
<box>
<background>white</background>
<text>black</text>
<match_label>#A0A0A0</match_label>
</box>
<filter>black</filter>
<button>
<normal>white</normal>
<hover>#F2F2F2</hover>
<press>#CECECE</press>
<disabled>white</disabled>
<icon>#727272</icon>
<icon_disabled>#CECECE</icon_disabled>
</button>
</screen_search>
</config>
+38 -8
View File
@@ -181,7 +181,7 @@
<fill>#FFFF0000</fill>
</focus>
</error>
<fulltext>
<fulltext_search>
<normal>
<fill>#207EA8</fill>
<text>#F7F7F7</text>
@@ -190,7 +190,17 @@
<border>#006D93</border>
<fill>#134B63</fill>
</focus>
</fulltext>
</fulltext_search>
<screen_search>
<normal>
<border>transparent</border>
<fill>#6EDB42</fill>
<text>#000000</text>
</normal>
<focus>
<fill>#FF52E8</fill>
</focus>
</screen_search>
</annotation>
</snippet>
</code>
@@ -407,6 +417,14 @@
</aggregation>
</edge>
</graph>
<tab>
<background>#272728</background>
<active>white</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
<table>
<background>#272728</background>
<table>white</table>
@@ -423,10 +441,22 @@
<active>#969696</active>
</table_line_2>
</table>
<tab>
<background>#272728</background>
<active>white</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
<screen_search>
<background>#777777</background>
<box>
<background>#272728</background>
<text>#F7F7F7</text>
<match_label>#A0A0A0</match_label>
</box>
<filter>#F7F7F7</filter>
<button>
<normal>#272728</normal>
<hover>#333333</hover>
<press>#555555</press>
<disabled>#272728</disabled>
<icon>white</icon>
<icon_disabled>#555555</icon_disabled>
</button>
</screen_search>
</config>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

@@ -0,0 +1,82 @@
#screen_search_bar {
border: none;
}
#screen_search_box {
padding-left: 10;
border-top: 1px solid #BEBEBE;
background: <color:screen_search/background>;
}
#search_box {
background: <color:screen_search/box/background>;
border: none;
color: <color:screen_search/box/text>;
font-family: <setting:font_name>;
font-size: <setting:font_size>px;
margin: 4px 0;
max-width: <setting:font_size*20>px;
min-height: 20px;
padding: 1px 0px 1px 0px;
}
#match_label {
border: none;
background: <color:screen_search/box/background>;
color: <color:screen_search/box/match_label>;
font-size: <setting:font_size-2>px;
margin: 4px 0;
padding-right: 4px;
text-align: right;
min-width: <setting:font_size*7>px;
min-height: 20px;
max-height: 40px;
}
#search_button, #prev_button, #next_button, #close_button {
background: <color:screen_search/button/normal>;
width: 20px;
min-height: 20px;
max-height: 40px;
border-radius: 0;
margin: 4px 0;
}
#search_button {
border-bottom-left-radius: 10px;
border-top-left-radius: 10px;
padding-left: 2px;
}
#prev_button {
margin: 4px 1px;
}
#next_button {
border-bottom-right-radius: 10px;
border-top-right-radius: 10px;
}
#prev_button:disabled, #next_button:disabled {
background: <color:screen_search/button/disabled>;
}
#prev_button:hover, #next_button:hover {
background: <color:screen_search/button/hover>;
}
#prev_button:pressed, #next_button:pressed {
background: <color:screen_search/button/press>;
}
#close_button {
background: transparent;
margin: 4px 6px;
padding-top: 1px;
}
#filter_checkbox {
color: <color:screen_search/filter>;
margin-left: 20px;
font-size: <setting:font_size-1>px;
}