2 Commits

3 changed files with 14 additions and 7 deletions

View File

@@ -792,18 +792,21 @@ fe_set_topic (session *sess, char *topic, char *stripped_topic)
{ {
if (!sess->gui->is_tab || sess == current_tab) if (!sess->gui->is_tab || sess == current_tab)
{ {
GtkTextBuffer *topic_buffer;
GtkTextIter start;
GtkTextIter end;
topic_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (sess->gui->topic_entry));
if (prefs.hex_text_stripcolor_topic) if (prefs.hex_text_stripcolor_topic)
{ {
gtk_text_buffer_set_text ( gtk_text_buffer_set_text (topic_buffer, stripped_topic, -1);
gtk_text_view_get_buffer (GTK_TEXT_VIEW (sess->gui->topic_entry)),
stripped_topic, -1);
} }
else else
{ {
gtk_text_buffer_set_text ( gtk_text_buffer_set_text (topic_buffer, topic, -1);
gtk_text_view_get_buffer (GTK_TEXT_VIEW (sess->gui->topic_entry)),
topic, -1);
} }
gtk_text_buffer_get_bounds (topic_buffer, &start, &end);
gtk_text_buffer_apply_tag_by_name (topic_buffer, "zoitechat-topic-left", &start, &end);
mg_set_topic_tip (sess); mg_set_topic_tip (sess);
} }
else else

View File

@@ -2998,7 +2998,7 @@ mg_create_topicbar (session *sess, GtkWidget *box)
sess->res->tab = NULL; sess->res->tab = NULL;
gui->topic_entry = topic = gtk_text_view_new (); gui->topic_entry = topic = gtk_text_view_new ();
gtk_widget_set_name (topic, "zoitechat-inputbox"); gtk_widget_set_name (topic, "zoitechat-topicbox");
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (topic), GTK_WRAP_WORD_CHAR); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (topic), GTK_WRAP_WORD_CHAR);
gtk_text_view_set_justification (GTK_TEXT_VIEW (topic), GTK_JUSTIFY_LEFT); gtk_text_view_set_justification (GTK_TEXT_VIEW (topic), GTK_JUSTIFY_LEFT);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (topic), 4); gtk_text_view_set_left_margin (GTK_TEXT_VIEW (topic), 4);

View File

@@ -167,10 +167,14 @@ theme_css_build_input (const char *theme_name, guint16 fg_red, guint16 fg_green,
"background-color: #%02x%02x%02x;" "background-color: #%02x%02x%02x;"
"color: #%02x%02x%02x;" "color: #%02x%02x%02x;"
"caret-color: #%02x%02x%02x;" "caret-color: #%02x%02x%02x;"
"word-spacing: normal;"
"letter-spacing: normal;"
"}" "}"
"%s {" "%s {"
"color: #%02x%02x%02x;" "color: #%02x%02x%02x;"
"caret-color: #%02x%02x%02x;" "caret-color: #%02x%02x%02x;"
"word-spacing: normal;"
"letter-spacing: normal;"
"}" "}"
"%s selection, %s text selection, %s:focus selection, %s:focus text selection, %s *:selected, %s *:selected:focus {" "%s selection, %s text selection, %s:focus selection, %s:focus text selection, %s *:selected, %s *:selected:focus {"
"background-color: #%02x%02x%02x;" "background-color: #%02x%02x%02x;"