Pager config not working with vertical Panel

Richard Dale richard.j.dale at gmail.com
Tue Jul 28 19:49:10 CEST 2009


On Tue, Jul 28, 2009 at 5:58 PM, Anthony Bryant<antjbryant at gmail.com> wrote:
> On Tue, Jul 28, 2009 at 4:00 PM, Richard Dale<richard.j.dale at gmail.com> wrote:
>> I have four virtual desktops and a vertical panel on the right. If I
>> use the configure dialog to set the number of columns to two, it works
>> fine, and I have my four desktops in two rows and two columns. If I
>> set the number of columns to one, I end up with a single row of four
>> tiny desktops in four columns.
>
> I'm not completely sure, but I think somehow you weren't running my
> patch when you tried to test it...
> I've definitely fixed the problem you described here.
My apologies. I think I ran patch with '--dry-run' to see if it was
ok, and then forgot to actually patch the sources before building and
testing. So I was testing the version in the svn which explains why
your patch seemed much the same as that. oops.. It indeed works fine
when I actually built and installed it properly and certainly fixes
the problem I was originally trying to fix.

>> It unconditionally sets 'm_columns' to 0, which is the very thing I
>> was changing when I used the config dialog with my vertical panel. I
>> also prefer my change at the beginning of recalculateGeometry() to the
>> one in the reviewboard patch.
>
> The reason that my patch always calculates columns from rows and not
> the other way around is because rows is what is stored in the config
> file. If you start storing columns in the rows field in the config
> file then it really won't behave when there are two applets, one in a
> vertical panel and the other either on the desktop or in a horizontal
> panel.
Well in the config dialog for a pager in a vertical panel it refers to
'columns'. So for a vertical panel I made it set m_columns, rather
than m_rows, and changed recalculateGeometry to match. It works just
as well if you always only change m_rows via the config dialog as
you've done. If a horizontal pager finds its config has changed, I
assume it would re-read its config and then set 'm_rows'.

If sometimes 'rows' aren't actually meaning rows, but columns it all
gets very confusing to me. Hence, my suggestion of using
'm_constrained_dimension' and 'm_derived_dimension' or similar.

>> Another problem which neither patch fixes is that sometimes (but not
>> always) my config of 1 column X 4 rows of desktops is truncated
>> vertically and I can only see slightly more than the first desktop,
>> although there is plenty of room in my panel to show all four.
>
> My patch on reviewboard does in fact fix this as well (and is working
> locally), which is why i suspect that you weren't actually running my
> patch when you tried to test it. Did I upload it wrong or something?
>
> Just to make sure: when you resize the pager on the desktop do you see
> a lot of debug output that says "ignoring size constraint" ? - my
> version removed that debug line so if you see it you're still on the
> old version.
Yes everything looks fine to me, once I installed it properly, and
I'll carry on using the pager with your patch.

-- Richard


More information about the Plasma-devel mailing list