Modify

Opened 11 years ago

Closed 10 years ago

#3501 closed defect (fixed)

osd channel icon not rescaled on osd theme change

Reported by: anonymous Owned by: stuartm
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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@0.85_1_30_30 and cache_+home+mythtv+.mythtv+channels+space.jpg@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.

Attachments (1)

iconosd.patch (765 bytes) - added by maverik044 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by maverik044

comment:1 Changed 11 years ago by anonymous

This fixes the problem described in Ticket #3599

comment:2 Changed 10 years ago by stuartm

  • Owner changed from ijr to stuartm

comment:3 Changed 10 years ago by stuartm

  • Resolution set to fixed
  • Status changed from new to closed

(In [14160]) Fixes #3501 and #3599.

Ensures that the cache key for the scaled channel icon uses the actual dimension of the icon as specified in the theme and not the default 30x30.

Add Comment

Modify Ticket

Action
as closed The owner will remain stuartm.
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.