Resizing the window does not fill the window with icons

Bug #974728 reported by Jono Bacon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Viewer
Fix Released
Low
Rafał Cieślak

Bug Description

When I load the GUI and resize the window the icons stay in place and do not take up the full width of the window.

If I remember right there is some kind of setting in Glade to do this.

Related branches

summary: - Resizing the window does fill the window with icons
+ Resizing the window does not fill the window with icons
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

You probably meant to set "columns" property, which determines the number of columns to display. If it's set to -1 (as it is now) it will use the optimal number of columns. However, this takes place only at the initiation phase. We would need to recalculate the number of columns to display when the window is resized.

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Also, manually setting the colums number to a greater constant prevents user from resizing the window so that it is less wide, as the GtkIconView requests the size appropriate to the width of all columns + spacing + margin.

Revision history for this message
Jono Bacon (jonobacon) wrote :

I had fixed this a while back using some setting in Glade but it got lost in a recent merge. See http://www.youtube.com/watch?v=Uyuy1GiNuwQ from 2.05 to see it working. Any idea what I might have done? LOL!

Jono Bacon (jonobacon)
affects: ubuntu-accomplishments-system → ubuntu-accomplishments-viewer
Changed in ubuntu-accomplishments-viewer:
milestone: 0.1 → none
milestone: none → 0.1
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Wow, I've just noticed something cool (or maybe terrible?). There is a way to fill the window with icons! Step1: Press the Opportunities toolbar button. Step2: Resize the window to make it bigger. Step3: Press the Opportunities button again. Tada!
Either this may be a good point to start, or a weird bug difficult to fix. Why?
The problem is, that once the window is re-filled with icons, it is impossible to make it smaller again. This also means that maximizing the window and then unmaximizing it again results in a screen-wide window which is not resizable.

If this bug turns out to be the show-stopper for 0.1, a temporary workaround may be to set the window's width to a constant size and force it to be not resizable, while we are fixing it.

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Okay - if one connects window's resize event to our update_views function (applying required arguments) this should more or less work - because the GtkIconView will update the collumns number when it's contents are deleted and then added again.
However, this leads to a even more ugly behavior - because - as I've mentioned in previous comment - the window can be enlarged, but it is impossible to make it smaller again.

Revision history for this message
Jono Bacon (jonobacon) wrote :

Hmmm well spotted on the re-sizing bug in which you can't make the window smaller, I filed this specific bug at https://bugs.launchpad.net/ubuntu-accomplishments-viewer/+bug/986708

I am not sure how we can resolve this, but I am almost 100% sure we can as I had this working previously (as you saw in the video).

I might see if I can get a GTK expert to take a look at this.

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Eventually we might solve this by creating a own GTK widget, that would work similarly to GtkIconView, but would handle resizing the way we want it, and might draw decorative cabinet by the way (that also needs reacting on resize). But nobody likes the potential trouble caused by designing own widgets, so this is acceptable only eventually.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote : Re: [Bug 974728] Re: Resizing the window does not fill the window with icons

Pavol, I fails to see how that relates to either custom widgets or this
bug. I have a good experience with custom widgets and never had any
problems with allocating space, also, the GtkIconView we are currently
having problem with is refreshing correctly.

Changed in ubuntu-accomplishments-viewer:
assignee: nobody → Rafal Cieślak (rafalcieslak256)
Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-viewer:
status: Confirmed → Fix Committed
Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-viewer:
status: Fix Committed → Fix Released
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.