Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Apply font changes to server list #2264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Martchus
Copy link

  • Prevent use of inflexible
    gtk_cell_renderer_text_set_fixed_height_from_font()
    (performance with lots of servers still seems good)
  • Redraw server list when applying setup

See #2023


I'm aware this fixes only one of the lists in the issue. But I would like to wait for feedback first because it is my first time working GTK.

* Prevent use of inflexible
  gtk_cell_renderer_text_set_fixed_height_from_font()
  (performance with lots of servers still seems good)
* Redraw server list when applying setup

See hexchat#2023
cv_tree_queue_draw (chanview *cv)
{
/* assign the model again to cause the tree view to be redrawn
note: Simply using gtk_widget_queue_draw() is not sufficient. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a hacky workaround, I'd prefer figuring out a way to just tell it to redraw.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked at the documentation and tried several things before coming up with that hack. Do you have a specific API function in mind? I only found that function I mention in the comment but it is not sufficient because the layout is still not updated.

The preferred way for this to work is likely that GTK triggers the layout update itself if relevant properties like the font change. So doing things manually here will always be not the optimal solution and therefore a "hacky workaround".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants