aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content_view/conversation_view.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-05-14 14:45:59 +0200
committerfiaxh <git@lightrise.org>2022-07-27 20:34:20 +0200
commitf44cbe02c17df1f02ad49c63cd784fec0ea02d85 (patch)
tree4cab9b5f84d88769d19b0698e24b318f50b6144e /main/src/ui/conversation_content_view/conversation_view.vala
parent2b3ce5fc95c63ed7d54e207db0585c8b8bbcd603 (diff)
downloaddino-f44cbe02c17df1f02ad49c63cd784fec0ea02d85.tar.gz
dino-f44cbe02c17df1f02ad49c63cd784fec0ea02d85.zip
Improve Gtk4 port
Diffstat (limited to 'main/src/ui/conversation_content_view/conversation_view.vala')
-rw-r--r--main/src/ui/conversation_content_view/conversation_view.vala9
1 files changed, 5 insertions, 4 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala
index 8d46281f..bfee3cbb 100644
--- a/main/src/ui/conversation_content_view/conversation_view.vala
+++ b/main/src/ui/conversation_content_view/conversation_view.vala
@@ -108,7 +108,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
private void on_leave_notify_event() {
if (currently_highlighted != null) {
- currently_highlighted.get_style_context().remove_class("highlight");
+ currently_highlighted.remove_css_class("highlight");
currently_highlighted = null;
}
message_menu_box.visible = false;
@@ -134,7 +134,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
}
};
- if (currently_highlighted != null) currently_highlighted.get_style_context().remove_class("highlight");
+ if (currently_highlighted != null) currently_highlighted.remove_css_class("highlight");
currently_highlighted = null;
current_meta_item = null;
@@ -160,7 +160,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
if (current_meta_item != null) {
// Highlight widget
currently_highlighted = w;
- currently_highlighted.get_style_context().add_class("highlight");
+ currently_highlighted.add_css_class("highlight");
// Move message menu
message_menu_box.margin_top = (int)(widget_y - 10);
@@ -233,7 +233,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
i++;
}
scrolled.vadjustment.value = h - scrolled.vadjustment.page_size * 1/3;
- w.get_style_context().add_class("highlight-once");
+ w.add_css_class("highlight-once");
reload_messages = true;
stack.set_visible_child_name("main");
return false;
@@ -414,6 +414,7 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
});
}
} else if (scrolled.vadjustment.value < scrolled.vadjustment.upper - scrolled.vadjustment.page_size - 1) {
+ print("move!\n");
scrolled.vadjustment.value = scrolled.vadjustment.upper - was_upper + scrolled.vadjustment.value; // stay at same content
}
was_upper = scrolled.vadjustment.upper;