GNOME Bugzilla – Bug 588865
window is too tiny when opening new chatrooms with contact list
Last modified: 2018-05-22 13:36:15 UTC
Currently if you open a new channel you get a really tiny chat window with a huge contact list (see the screenshot). This is caused by these lines of code in empathy-chat.c +1266 /* We are adding the contact list to the chat, we don't want the * chat view to become too small. If the chat view is already * smaller than 250 make sure that size won't change. If the * chat view is bigger the contact list will take some space on * it but we make sure the chat view don't become smaller than * 250. Relax the size request once the resize is done */ min_width = MIN (priv->vbox_left->allocation.width, 250); gtk_widget_set_size_request (priv->vbox_left, min_width, -1); while this works when the window is bigger than 250, it does not when it is smaller. Looking at the gtk_widget_set_size_request doc, we can see: "Sets the minimum size of a widget" which is exactly what we want (from the comment). In my opinion we should remove those lines, and set a minimum width and height request directly in the .ui file
Created attachment 138582 [details] screenshot
Created attachment 138583 [details] [review] tiny-chatroom.patch
Comment on attachment 138583 [details] [review] tiny-chatroom.patch This is not the correct approach at all. We should not be hard setting a size request in the UI file (this is rarely ever something that we want to do). A more correct approach might be when we wish to show the contact list, fix the size-request of the chat window to be the size of the allocation, show the sidebar (forcing a window resize) and then releasing the size-request again.
I thought to use the size request in the UI because there is already the size request of the contact list. Anyway the initial approach was to "steal" the contact list size from the chat view, if the chat view size was > 250. So tell me if the following steps would be correct: - #define CONTACT_LIST_WIDTH 200 /* (taken from UI, why is it so high??) */ - #define MIN_CHAT_WIDTH 250 - request chat width = MIN_CHAT_WIDTH (so if the chat is bigger, we steal the space, if it is smaller we don't steal anything) - show contact list - request contact list width = CONTACT_LIST_WIDTH (why a so high value?) - release both requests
Are you sure that keeping a size request for the chat window is wrong? In my opinion it is useless to have a small chat window: there's no reason to resize it to less than MIN_CHAT_WIDTH (which could be decided to be even less than 250) or you won't see anything inside
*** Bug 586268 has been marked as a duplicate of this bug. ***
isn't bug 612216 the same?
Not really the same, but maybe a fix to that bug would also fix this
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/95.