[mythtv-commits] mythtv commit: r23450 - in trunk/mythtv/libs by cpinkham

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Wed Feb 3 02:54:54 UTC 2010


      Author: cpinkham
        Date: 2010-02-03 02:54:54 +0000 (Wed, 03 Feb 2010)
New Revision: 23450
   Changeset: http://svn.mythtv.org/trac/changeset/23450

Modified:

   trunk/mythtv/libs/libmythdb/mythversion.h
   trunk/mythtv/libs/libmythui/mythuibuttonlist.cpp
   trunk/mythtv/libs/libmythui/mythuibuttonlist.h

Log:

Fix buttonlist scaling by tweaking the sizes of buttons to fill up
the desired space without leaving a gap at the bottom which results
when using fixed button sizes means that X buttons is too small for
the list area but X+1 buttons would be too large.  In order to
handle the area in between, we add 1 pixel in height/width as
necessary to each button starting at the top/left until we have
increased enough buttons by 1 pixel to fill up the buttonlist area.

For instance, if a buttonlist area is 409 pixels with button
spacing of 1 pixel, and each button is 40 pixels high, we can fit
in 10 buttons.  If we had to scale that down to 405 pixels then
if all buttons were the same size, each would be 39 pixels high
with a gap at the bottom of 6 pixels.  Instead of having this
'large' gap at the bottom, we make the top 6 buttons 40 pixels
in height and the remaining 4 buttons 39 pixels in height.  This
allow us to have no gap at the bottom and maintain the 1-pixel
spacing between buttons.  This is preferable to increasing
the button spacing from 1 to 2 pixels between some buttons
because a 1 vs 2 pixel difference between some sets of buttons
is much more noticeable than a 39 vs 40 pixel button size.

This does update the binary version since it updates libmythui,
so recompile plugins, etc...






More information about the mythtv-commits mailing list