Bug 1479070 - log widget is limited in height
log widget is limited in height
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gtk3 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Benjamin Otte
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2017-08-07 17:39 EDT by Oliver Haessler
Modified: 2018-02-20 18:08 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot of window with limited log widget view (21.30 KB, image/png)
2017-08-07 17:40 EDT, Oliver Haessler
no flags Details

  None (edit)
Description Oliver Haessler 2017-08-07 17:39:52 EDT
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):

How reproducible:

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 Haessler 2017-08-07 17:40 EDT
Created attachment 1310361 [details]
screenshot of window with limited log widget view
Comment 3 Brandon Haberfeld 2017-10-18 03:43:58 EDT
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

Note You need to log in before you can comment on or make changes to this bug.