Bug 1479070

Summary: log widget is limited in height
Product: Red Hat Enterprise Linux 7 Reporter: Oliver Ilian <oliver>
Component: gtk3Assignee: Benjamin Otte <otte>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: brandonh, cww, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-12 21:06:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of window with limited log widget view none

Description Oliver Ilian 2017-08-07 21:39:52 UTC
Description of problem:
In a window where you have the option to show the log window, the log window widget is very limited in height (see screenshot)

Version-Release number of selected component (if applicable):
gnome-shell-3.22.3-17.el7.x86_64
gtk3-3.22.10-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. open a window that has a log widget (like the sealert bug report window (see screenshot)
2. expand the log widget

Actual results:
The window/widget is very small

Expected results:
The window/widget should fill the whole parent window

Additional info:
This also happens when you create log widgets with the yad tool

Comment 2 Oliver Ilian 2017-08-07 21:40:39 UTC
Created attachment 1310361 [details]
screenshot of window with limited log widget view

Comment 3 Brandon Haberfeld 2017-10-18 07:43:58 UTC
We have experienced the same issue with gtk3.22 affecting YAD and traced it to the following:

yad-0.39.0-1.el7.x86_64 RPM does not allow the progress bar log expander object to fill the parent

Run the gtk debugger to see the property: 
 >export GTK_DEBUG=interactive yad
 >yad  --progress --enable-log --log-expanded --log-height=5000 < <(echo "#Some text in the log window")

Using the debugger you can manually set the expand property of the sw container to TURE (it's is false and shouldn't be) and instantly the log window expands.


On further investigation in the YAD code in progress.c:

      ex = gtk_expander_new (options.progress_data.log);
      gtk_expander_set_spacing (GTK_EXPANDER (ex), 2);
      gtk_expander_set_expanded (GTK_EXPANDER (ex), options.progress_data.log_expanded);
 1    gtk_box_pack_start (GTK_BOX (w), ex, TRUE, TRUE, 2);

     sw = gtk_scrolled_window_new (NULL, NULL);
     gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN);
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), options.hscroll_policy, options.vscroll_policy);
     gtk_container_add (GTK_CONTAINER (ex), sw);

      progress_log = gtk_text_view_new ();
      gtk_widget_set_name (progress_log, "yad-text-widget");
      gtk_widget_set_size_request (progress_log, -1, options.progress_data.log_height);
      gtk_container_add (GTK_CONTAINER (sw), progress_log);


The problem seems to be that in line 1 the gtk constructor gtk_box_pack_start is given both TRUE, TRUE parameters to force child objects to autoexpand to their full height.  This is no longer being obeys in gtk3.22 and was being obeys in gtk 3.14.
The result is that the scroll window object (sw above) does not expand because it's bounding  container is also not filling the parent box when packed.

- 
There is therefore a fundamental change (or bug) in the gtk_box_pack_start constructor which is ignoring or not passing the two TRUE, TRUE arguments that control the "expand" property of the child objects. In GTK 3.22 the default value is being forced to FALSE for the "expand" property of a SW object  / When packed into a container object, the parameters of TRUE, TRUE are no longer being obeyed.

Brandon Haberfeld
Investec Bank
brandonh.za