[mythtv-commits] Ticket #3501: osd channel icon not rescaled on osd theme change

MythTV mythtv at cvs.mythtv.org
Thu May 24 03:42:58 UTC 2007

#3501: osd channel icon not rescaled on osd theme change
 Reporter:  anonymous  |       Owner:  ijr    
     Type:  defect     |      Status:  new    
 Priority:  minor      |   Milestone:  unknown
Component:  mythtv     |     Version:  head   
 Severity:  medium     |  
 If the osd theme is changed, the icon shown in the OSD may not be rescaled
 properly according to the staticsize specified in the osd.xml.  OSD
 graphics are cached and typically two cached versions of the channels
 icons are created one with a filename with the size specified by the theme
 (x_y) and another with a filename ending in 30_30. (Example:
 cache_+home+mythtv+.mythtv+channels+space.jpg at 0.85_1_30_30 and
 cache_+home+mythtv+.mythtv+channels+space.jpg at 0.85_1_44_44) Both are
 identical files.  The 30_30 file is create because OSDTypeImage::LoadImage
 (osdtypes.cpp) is called with fixed values of scalew=30 and scaleh=30 from
 OSD::SetText and OSD::SetInfoText (osd.cpp).  The function
 OSDImageCache::CreateKey called by LoadImage creates a cache key (ie file
 name) based on the scalew and scaleh.  Later on in LoadImage, scalew and
 scaleh are changed to be what the theme specifies to rescale the icon to.
 The attached patch moves this piece of code ahead of CreateKey so that the
 correct key (cache file) is generated matching the statesize specified by
 the theme.

 This avoids extraneous cache files being generated and ensures a new cache
 file will be generated if the theme changes.

Ticket URL: <http://svn.mythtv.org/trac/ticket/3501>
MythTV <http://svn.mythtv.org/trac>

More information about the mythtv-commits mailing list