bugFreeciv - Bugs: bug #20772, City dialog unit lists too short...

 
 
Show feedback again

bug #20772: City dialog unit lists too short vertically if unpopulated, don't grow if a unit is added

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat Apr 27 17:55:25 2013  
 
Category: client-gtk-3.0Severity: 2 - Minor
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: 2.4.0-beta2Operating System: GNU/Linux
Planned Release: 2.4.5, 2.5.0, 2.6.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat Dec 20 03:38:30 2014, SVN revision 27355:

Set minimum height for gtk3-client citydlg present and supported unit lists
even if they are empty.

Reported by Jacob Nevins

See bug #20772

(Browse SVN revision 27355)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat Dec 20 03:38:23 2014, SVN revision 27354:

Set minimum height for gtk3-client citydlg present and supported unit lists
even if they are empty.

Reported by Jacob Nevins

See bug #20772

(Browse SVN revision 27354)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat Dec 20 03:38:15 2014, SVN revision 27353:

Set minimum height for gtk3-client citydlg present and supported unit lists
even if they are empty.

Reported by Jacob Nevins

See bug #20772

(Browse SVN revision 27353)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon Dec 15 22:19:54 2014, comment #2:

Fixes attached.

Use gtk_widget_set_size_request() on table inside the scrolled window, not gtk_scrolled_window_set_min_content_height() on scrolled window itself. While this is not explicitly setting constant height, it sets minimum height, and I'm not aware of any situation where it would expand to size bigger than that.
Also use unit height and not terrain tile height.

I also tested setting vexpand for the scrolled windows, but that gave less good results when one of the windows is populated and the other is not - they would only divide remaining space once populated one has already taken space it needs, meaning it gets much higher than the unpopulated one.

(file #23212, file #23213)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon Apr 29 22:10:57 2013, comment #1:

> I think the rows should be of constant height regardless of whether they contain any units


First of all, it seems these scrolled windows can't be of constant height, not with GTK_POLICY_AUTOMATIC, unless you want to query the theme for scrolled window's vscrollbar height.

Now, the odd thing is that it would seem that gtk_scrolled_window_set_min_content_height should suffice, but for some odd reason it doesn't while gtk_widget_set_size_request does. Makes me wonder if this could be considered a gtk+ bug - that is whether or not the mentioned function should apply to an empty widget. If not, docs should be clear about it.

Rafał Mużyło <galtgendo>
Sat Apr 27 17:55:25 2013, original submission:

If a city supports or contains no units when its dialog is opened, the relevant row of unit icons is much shorter vertically that it would be if it contained anything.

If a unit is subsequently added to one of these categories (say to "supported" by changing the homecity of a unit present in the city), the row doesn't grow vertically until the dialog is closed and reopened.

I think the rows should be of constant height regardless of whether they contain any units (I think this is how the Gtk2 client behaves).

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #23212:  CitydlgUnitHeight.patch added by cazfi (2kB - text/x-diff)
file #17836:  gtk3-citydlg.png added by jtn (5kB - image/png)

 

Depends on the following items: None found

Digest:
   task dependencies.

 

Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Dec 20 03:38:44 2014cazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Mon Dec 15 22:19:54 2014cazfiAttached File-=>Added CitydlgUnitHeight.patch, #23212
      Attached File-=>Added CitydlgUnitHeight-S2_5.patch, #23213
      StatusNone=>Ready For Test
      Planned Release2.5.0=>2.4.5, 2.5.0, 2.6.0
    Sat Jan 25 13:42:59 2014jtnPlanned Release=>2.5.0
    Sat Jan 25 13:37:14 2014jtnPlanned Release2.4.1, 2.5.0=>
    Sun Aug 4 19:56:36 2013cazfiPlanned Release2.4.0,2.5.0=>2.4.1, 2.5.0
    Sat Apr 27 17:55:25 2013jtnAttached File-=>Added gtk3-citydlg.png, #17836
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup