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 27 Apr 2013 05:55:25 PM UTC  
Category: client-gtk-3.0Severity: 2 - Minor
Priority: 5 - NormalStatus: Ready For Test
Assigned to: NoneOpen/Closed: Open
Release: 2.4.0-beta2Operating System: GNU/Linux
Planned Release: 2.4.5, 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Mon 15 Dec 2014 10:19:54 PM UTC, 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 Administrator
Mon 29 Apr 2013 10:10:57 PM UTC, 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 27 Apr 2013 05:55:25 PM UTC, 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):

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

   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.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Dec 2014 10:19:54 PM UTCcazfiAttached 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 25 Jan 2014 01:42:59 PM UTCjtnPlanned Release=>2.5.0
    Sat 25 Jan 2014 01:37:14 PM UTCjtnPlanned Release2.4.1, 2.5.0=>
    Sun 04 Aug 2013 07:56:36 PM UTCcazfiPlanned Release2.4.0,2.5.0=>2.4.1, 2.5.0
    Sat 27 Apr 2013 05:55:25 PM UTCjtnAttached File-=>Added gtk3-citydlg.png, #17836
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup