aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input/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/chat_input/view.vala
parent2b3ce5fc95c63ed7d54e207db0585c8b8bbcd603 (diff)
downloaddino-f44cbe02c17df1f02ad49c63cd784fec0ea02d85.tar.gz
dino-f44cbe02c17df1f02ad49c63cd784fec0ea02d85.zip
Improve Gtk4 port
Diffstat (limited to 'main/src/ui/chat_input/view.vala')
-rw-r--r--main/src/ui/chat_input/view.vala20
1 files changed, 10 insertions, 10 deletions
diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala
index 6524a825..81f2bd0f 100644
--- a/main/src/ui/chat_input/view.vala
+++ b/main/src/ui/chat_input/view.vala
@@ -66,28 +66,28 @@ public class View : Box {
public void set_input_state(Plugins.InputFieldStatus.MessageType message_type) {
switch (message_type) {
case Plugins.InputFieldStatus.MessageType.NONE:
- this.get_style_context().remove_class("dino-input-warning");
- this.get_style_context().remove_class("dino-input-error");
+ this.remove_css_class("dino-input-warning");
+ this.remove_css_class("dino-input-error");
break;
case Plugins.InputFieldStatus.MessageType.INFO:
- this.get_style_context().remove_class("dino-input-warning");
- this.get_style_context().remove_class("dino-input-error");
+ this.remove_css_class("dino-input-warning");
+ this.remove_css_class("dino-input-error");
break;
case Plugins.InputFieldStatus.MessageType.WARNING:
- this.get_style_context().add_class("dino-input-warning");
- this.get_style_context().remove_class("dino-input-error");
+ this.add_css_class("dino-input-warning");
+ this.remove_css_class("dino-input-error");
break;
case Plugins.InputFieldStatus.MessageType.ERROR:
- this.get_style_context().remove_class("dino-input-warning");
- this.get_style_context().add_class("dino-input-error");
+ this.remove_css_class("dino-input-warning");
+ this.add_css_class("dino-input-error");
break;
}
}
public void highlight_state_description() {
- chat_input_status.get_style_context().add_class("input-status-highlight-once");
+ chat_input_status.add_css_class("input-status-highlight-once");
Timeout.add_seconds(1, () => {
- chat_input_status.get_style_context().remove_class("input-status-highlight-once");
+ chat_input_status.remove_css_class("input-status-highlight-once");
return false;
});
}