Improve libadwaita integration
This commit is contained in:
parent
0d7c8bb6e1
commit
92aca5672d
|
@ -9,6 +9,7 @@
|
||||||
</style>
|
</style>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkMenuButton" id="add_button">
|
<object class="GtkMenuButton" id="add_button">
|
||||||
|
<property name="has-frame">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkImage">
|
||||||
<property name="icon-name">list-add-symbolic</property>
|
<property name="icon-name">list-add-symbolic</property>
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child type="end">
|
<child type="end">
|
||||||
<object class="GtkMenuButton" id="menu_button">
|
<object class="GtkMenuButton" id="menu_button">
|
||||||
|
<property name="has-frame">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkImage">
|
||||||
<property name="icon-name">open-menu-symbolic</property>
|
<property name="icon-name">open-menu-symbolic</property>
|
||||||
|
|
|
@ -38,7 +38,6 @@ public class ConversationSelector : Widget {
|
||||||
|
|
||||||
construct {
|
construct {
|
||||||
add_css_class("sidebar");
|
add_css_class("sidebar");
|
||||||
list_box.set_header_func(header);
|
|
||||||
list_box.set_sort_func(sort);
|
list_box.set_sort_func(sort);
|
||||||
|
|
||||||
realize.connect(() => {
|
realize.connect(() => {
|
||||||
|
@ -139,14 +138,6 @@ public class ConversationSelector : Widget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void header(ListBoxRow row, ListBoxRow? before_row) {
|
|
||||||
if (row.get_header() == null && before_row != null) {
|
|
||||||
row.set_header(new Separator(Orientation.HORIZONTAL));
|
|
||||||
} else if (row.get_header() != null && before_row == null) {
|
|
||||||
row.set_header(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int sort(ListBoxRow row1, ListBoxRow row2) {
|
private int sort(ListBoxRow row1, ListBoxRow row2) {
|
||||||
ConversationSelectorRow cr1 = row1 as ConversationSelectorRow;
|
ConversationSelectorRow cr1 = row1 as ConversationSelectorRow;
|
||||||
ConversationSelectorRow cr2 = row2 as ConversationSelectorRow;
|
ConversationSelectorRow cr2 = row2 as ConversationSelectorRow;
|
||||||
|
|
Loading…
Reference in a new issue