mirror of
https://github.com/JockeTF/fimfareader.git
synced 2025-03-23 19:57:13 +01:00
Speed up UI using fixed tree view size
This commit is contained in:
parent
e6760885c4
commit
76a4951a1e
2 changed files with 11 additions and 11 deletions
|
@ -15,7 +15,7 @@ pub struct AppWindow {
|
||||||
fetcher: Fetcher<BufReader<File>>,
|
fetcher: Fetcher<BufReader<File>>,
|
||||||
window: ApplicationWindow,
|
window: ApplicationWindow,
|
||||||
search: ToggleButton,
|
search: ToggleButton,
|
||||||
result: Mutex<TreeView>,
|
result: TreeView,
|
||||||
entry: Entry,
|
entry: Entry,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ impl AppWindow {
|
||||||
fetcher: fetcher,
|
fetcher: fetcher,
|
||||||
window: builder.get_object("app")?,
|
window: builder.get_object("app")?,
|
||||||
search: builder.get_object("search")?,
|
search: builder.get_object("search")?,
|
||||||
result: Mutex::new(builder.get_object("result")?),
|
result: builder.get_object("result")?,
|
||||||
entry: builder.get_object("entry")?,
|
entry: builder.get_object("entry")?,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -63,8 +63,7 @@ impl AppWindow {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = self.result.lock().unwrap();
|
self.result.set_model(Some(&store));
|
||||||
result.set_model(Some(&store));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn filter(&self, query: &str) {
|
pub fn filter(&self, query: &str) {
|
||||||
|
|
|
@ -100,6 +100,7 @@ Author: Joakim Soderlund
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="enable_search">False</property>
|
<property name="enable_search">False</property>
|
||||||
|
<property name="fixed_height_mode">True</property>
|
||||||
<property name="show_expanders">False</property>
|
<property name="show_expanders">False</property>
|
||||||
<child internal-child="selection">
|
<child internal-child="selection">
|
||||||
<object class="GtkTreeSelection"/>
|
<object class="GtkTreeSelection"/>
|
||||||
|
@ -109,8 +110,8 @@ Author: Joakim Soderlund
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="sizing">fixed</property>
|
<property name="sizing">fixed</property>
|
||||||
<property name="fixed_width">100</property>
|
<property name="fixed_width">100</property>
|
||||||
<property name="min_width">75</property>
|
<property name="min_width">100</property>
|
||||||
<property name="max_width">200</property>
|
<property name="max_width">100</property>
|
||||||
<property name="title" translatable="yes">ID</property>
|
<property name="title" translatable="yes">ID</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText"/>
|
<object class="GtkCellRendererText"/>
|
||||||
|
@ -124,8 +125,8 @@ Author: Joakim Soderlund
|
||||||
<object class="GtkTreeViewColumn" id="title_column">
|
<object class="GtkTreeViewColumn" id="title_column">
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="sizing">fixed</property>
|
<property name="sizing">fixed</property>
|
||||||
<property name="fixed_width">300</property>
|
<property name="fixed_width">400</property>
|
||||||
<property name="min_width">100</property>
|
<property name="min_width">400</property>
|
||||||
<property name="max_width">400</property>
|
<property name="max_width">400</property>
|
||||||
<property name="title" translatable="yes">Title</property>
|
<property name="title" translatable="yes">Title</property>
|
||||||
<child>
|
<child>
|
||||||
|
@ -139,10 +140,10 @@ Author: Joakim Soderlund
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="author_column">
|
<object class="GtkTreeViewColumn" id="author_column">
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="sizing">autosize</property>
|
<property name="sizing">fixed</property>
|
||||||
<property name="fixed_width">300</property>
|
<property name="fixed_width">300</property>
|
||||||
<property name="min_width">100</property>
|
<property name="min_width">300</property>
|
||||||
<property name="max_width">500</property>
|
<property name="max_width">300</property>
|
||||||
<property name="title" translatable="yes">Author</property>
|
<property name="title" translatable="yes">Author</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText"/>
|
<object class="GtkCellRendererText"/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue