mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-31 09:40:19 +00:00
Merge pull request #176 from ZoiteChat/fix-font-consistency
Apply pref font to topic/tree/userlist/input
This commit is contained in:
@@ -2999,6 +2999,38 @@ mg_configure_topic_scroller (GtkWidget *scroller, GtkWidget *topic)
|
||||
gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (scroller), max_height);
|
||||
}
|
||||
|
||||
void
|
||||
mg_apply_session_font_prefs (session_gui *gui)
|
||||
{
|
||||
const PangoFontDescription *font = NULL;
|
||||
GtkWidget *topic_scroller;
|
||||
|
||||
if (!gui)
|
||||
return;
|
||||
|
||||
if (input_style)
|
||||
font = input_style->font_desc;
|
||||
|
||||
if (gui->topic_entry)
|
||||
{
|
||||
theme_manager_apply_entry_palette (gui->topic_entry, font);
|
||||
topic_scroller = gtk_widget_get_parent (gui->topic_entry);
|
||||
if (topic_scroller && GTK_IS_SCROLLED_WINDOW (topic_scroller))
|
||||
mg_configure_topic_scroller (topic_scroller, gui->topic_entry);
|
||||
}
|
||||
|
||||
if (gui->input_box && prefs.hex_gui_input_style)
|
||||
theme_manager_apply_entry_palette (gui->input_box, font);
|
||||
|
||||
if (gui->chanview)
|
||||
chanview_apply_theme (gui->chanview);
|
||||
|
||||
if (gui->user_tree)
|
||||
theme_manager_apply_userlist_style (gui->user_tree,
|
||||
theme_manager_get_userlist_palette_behavior (font));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
mg_create_topicbar (session *sess, GtkWidget *box)
|
||||
{
|
||||
@@ -3021,6 +3053,7 @@ mg_create_topicbar (session *sess, GtkWidget *box)
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (topic), 4);
|
||||
topic_scroller = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (topic_scroller), topic);
|
||||
theme_manager_apply_entry_palette (topic, input_style ? input_style->font_desc : NULL);
|
||||
mg_configure_topic_scroller (topic_scroller, topic);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), topic_scroller, TRUE, TRUE, 0);
|
||||
gtk_widget_add_events (topic, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
|
||||
@@ -37,6 +37,7 @@ GtkWidget *mg_create_generic_tab (char *name, char *title, int force_toplevel, i
|
||||
void mg_set_title (GtkWidget *button, char *title);
|
||||
void mg_set_access_icon (session_gui *gui, GdkPixbuf *pix, gboolean away);
|
||||
void mg_apply_setup (void);
|
||||
void mg_apply_session_font_prefs (session_gui *gui);
|
||||
void mg_close_sess (session *);
|
||||
void mg_tab_close (session *sess);
|
||||
void mg_detach (session *sess, int mode);
|
||||
|
||||
@@ -2066,7 +2066,7 @@ setup_apply_to_sess (session_gui *gui)
|
||||
{
|
||||
mg_update_xtext (gui->xtext);
|
||||
|
||||
theme_preferences_apply_to_session (gui, input_style);
|
||||
mg_apply_session_font_prefs (gui);
|
||||
|
||||
if (prefs.hex_gui_ulist_buttons)
|
||||
gtk_widget_show (gui->button_box);
|
||||
|
||||
Reference in New Issue
Block a user