ui: Added single file mode to code view

* Added navigation to top of code view for iterating references and switching between list and single file mode
* current file name and reference count is shown on top in single file mode
* refactored scrolling to location or line via request system
* added parameters animated and toTop to scrolling system
* refactored class hierarchy and removed unused stuff in list mode
This commit is contained in:
Eberhard Graether
2017-01-09 00:48:20 +01:00
parent 79937b21f0
commit 2bdc9b19a2
34 changed files with 1472 additions and 530 deletions
+89 -4
View File
@@ -1,7 +1,69 @@
#code_container, #code_file_list {
#code_navigation, #code_container, #code_container_single, #code_file_list, #code_file_single {
background-color: <color:code/background>;
}
#code_container, #code_file_list {
border: none;
}
#code_container {
border-top: 1px solid <color:code/line>;
}
#code_navigation * {
color: <color:code/file/title/text>;
font-size: <setting:font_size>px;
}
#code_navigation QPushButton {
background: <color:search/button/normal>;
border: none;
color: <color:search/button/icon>;
height: 24px;
width: 24px;
}
#code_navigation QPushButton:hover, #code_navigation QPushButton:checked {
background: <color:search/button/hover>;
}
#code_navigation QPushButton:disabled {
background: <color:search/button/disabled>;
}
#code_navigation QPushButton:pressed {
background: <color:search/button/press>;
}
#code_navigation #reference_button_previous, #code_navigation #reference_button_next {
border-radius: 12px;
}
#code_navigation #references_label {
background-color: <color:code/file/ref_count/background>;
border: none;
border-radius: 10px;
color: <color:code/file/ref_count/text>;
font-size: <setting:font_size>px;
padding: 0px 3px;
margin: 4px 6px 4px 6px;
}
#code_navigation #mode_button_list, #code_navigation #mode_button_single {
padding-left: 3px;
padding-right: 3px;
}
#code_navigation #mode_button_list {
border-bottom-left-radius: 12px;
border-top-left-radius: 12px;
}
#code_navigation #mode_button_single {
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
}
#code_file {
background-color: <color:code/snippet/background>;
border: 2px solid <color:code/file/background>;
@@ -38,14 +100,14 @@
background-color: <color:code/file/title/press>;
}
#code_file #references_label {
#code_file #references_label, #single_file_title_bar #references_label {
background-color: <color:code/file/ref_count/background>;
border: none;
border-radius: 10px;
color: <color:code/file/ref_count/text>;
font-size: <setting:font_size-2>px;
padding: 0px 3px;
margin: 4px 0px 4px;
margin: 4px 6px 4px 0px;
}
#code_file #code_snippet {
@@ -82,7 +144,7 @@
text-align: left;
}
#code_file #code_snippet #line_number_area {
#line_number_area {
background-color: <color:code/snippet/line_number/background>;
border: none;
color: <color:code/snippet/line_number/text>;
@@ -128,3 +190,26 @@
#code_file #minimize_button:enabled {
border-image: url(<setting:gui_path>code_view/images/minimize_active.png);
}
#single_file_title_bar {
background-color: <color:code/file/background>;
padding-right: 5px;
}
#single_file_title_bar #file_title {
background-color: <color:code/file/title/normal>;
border: none;
border-radius: 3px;
color: <color:code/file/title/text>;
font-size: <setting:font_size>px;
padding: 2px 4px;
margin: 3px 8px;
}
#single_file_title_bar #file_title:hover {
background-color: <color:code/file/title/hover>;
}
#single_file_title_bar #file_title:pressed {
background-color: <color:code/file/title/press>;
}