zenity window too big, not even proportional to text length

Bug #1273981 reported by Stéphane Gourichon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
zenity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

* Context

Simple execution of zenity

* Summary

zenity window opens too big.
The text appears on top but most of the window area is just empty.

* How to reproduce

Just type this :

zenity --info --text="$( for (( A=0; $A<20; A=$A+1 )) ; do echo -n 'lorem ipsum ' ; done )"

* expected

Window fits text

* observed

Window much too big. More than 90% window area is blank space.

* Additional information

It's not just a matter of too long a line. If text is cut in short lines, window is still too big (though proportionally it seems).
Notice below "echo -n" replaced with "echo".

zenity --info --text="$( for (( A=0; $A<20; A=$A+1 )) ; do echo 'lorem ipsum ' ; done )"

Trying with different text length shows that window area is not proportional to text length but grows much more rapidly.
In other words, the longer the text, the higher the percentage of wasted space.

This command shows a sequence of 30 zenity windows with increasing text length each time you press enter. You can see the trend easily.

for (( LENGTH=0; $LENGTH<30; LENGTH=$LENGTH+1 )) ; do echo $LENGTH ; zenity --info --text="$( for (( A=0; $A<$LENGTH; A=$A+1 )) ; do echo -n 'lorem ipsum ' ; done )" ; done

lsb_release -rd

Description: Ubuntu 13.10
Release: 13.10

apt-cache policy zenity

zenity:
  Installed: 3.8.0-1
  Candidate: 3.8.0-1
  Version table:
 *** 3.8.0-1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: zenity 3.8.0-1
ProcVersionSignature: Ubuntu 3.11.0-15.23-generic 3.11.10
Uname: Linux 3.11.0-15-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Wed Jan 29 08:31:03 2014
MarkForUpload: True
SourcePackage: zenity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Image showing window much bigger than needed with more than 90% blank area.

Obtained with

zenity --info --text="$( for (( A=0; $A<20; A=$A+1 )) ; do echo -n 'lorem ipsum ' ; done )" &

Revision history for this message
asl97 (asl97) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zenity (Ubuntu):
status: New → Confirmed
Revision history for this message
asl97 (asl97) wrote :

a temporary workaround is to add --no-wrap

eg:

zenity --info --text="$( for (( A=0; $A<20; A=$A+1 )) ; do echo -n 'lorem ipsum ' ; done )" --no-wrap &

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Thank you asl97.

It seems indeed to be bug #1206760 (I tried to find before posting but did not find that one).

Workaround is effective (well, in situations when it is acceptable, as in all workarounds).

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

It seems three bugs are about the same issue : #1087520 #1206760 and #1273981. Some have insightful content.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.