mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed handling of cSkinDisplayMenu::GetTextAreaFont()
This commit is contained in:
		@@ -3414,6 +3414,7 @@ Matthias Senzel <matthias.senzel@t-online.de>
 | 
			
		||||
 for fixing height calculation in progress display
 | 
			
		||||
 for fixing an unnecessary double display of the current menu item in page up/down
 | 
			
		||||
 for fixing an unnecessary double display of menu items in the Recordings menu
 | 
			
		||||
 for reporting a bug in handling cSkinDisplayMenu::GetTextAreaFont()
 | 
			
		||||
 | 
			
		||||
Marek Nazarko <mnazarko@gmail.com>
 | 
			
		||||
 for translating OSD texts to the Polish language
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							@@ -9944,3 +9944,4 @@ Video Disk Recorder Revision History
 | 
			
		||||
 | 
			
		||||
- Fixed a crash in strreplace() for multiple replacements with strings of different
 | 
			
		||||
  lengths (reported by Markus Ehrnsperger).
 | 
			
		||||
- Fixed handling of cSkinDisplayMenu::GetTextAreaFont() (reported by Matthias Senzel).
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: menuitems.c 5.1 2020/12/26 15:49:01 kls Exp $
 | 
			
		||||
 * $Id: menuitems.c 5.2 2024/07/13 09:12:18 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "menuitems.h"
 | 
			
		||||
@@ -497,10 +497,7 @@ void cMenuEditStrItem::AdvancePos(void)
 | 
			
		||||
void cMenuEditStrItem::Set(void)
 | 
			
		||||
{
 | 
			
		||||
  if (InEditMode()) {
 | 
			
		||||
     // This is an ugly hack to make editing strings work with the 'skincurses' plugin.
 | 
			
		||||
     const cFont *font = dynamic_cast<cSkinDisplayMenu *>(cSkinDisplay::Current())->GetTextAreaFont(false);
 | 
			
		||||
     if (!font || font->Width("W") != 1) // all characters have width == 1 in the font used by 'skincurses'
 | 
			
		||||
        font = cFont::GetFont(fontOsd);
 | 
			
		||||
 | 
			
		||||
     int width = cSkinDisplay::Current()->EditableWidth();
 | 
			
		||||
     width -= font->Width("[]");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								skins.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								skins.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: skins.c 5.1 2024/01/17 21:15:48 kls Exp $
 | 
			
		||||
 * $Id: skins.c 5.2 2024/07/13 09:12:18 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "skins.h"
 | 
			
		||||
@@ -139,9 +139,9 @@ int cSkinDisplayMenu::GetTextAreaWidth(void) const
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const cFont *cSkinDisplayMenu::GetTextAreaFont(bool) const
 | 
			
		||||
const cFont *cSkinDisplayMenu::GetTextAreaFont(bool  FixedFont) const
 | 
			
		||||
{
 | 
			
		||||
  return NULL;
 | 
			
		||||
  return cFont::GetFont(FixedFont ? fontFix : fontOsd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// --- cSkinDisplayReplay::cProgressBar --------------------------------------
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								skins.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								skins.h
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: skins.h 5.2 2024/06/11 12:43:25 kls Exp $
 | 
			
		||||
 * $Id: skins.h 5.3 2024/07/13 09:12:18 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __SKINS_H
 | 
			
		||||
@@ -310,8 +310,7 @@ public:
 | 
			
		||||
  virtual const cFont *GetTextAreaFont(bool FixedFont) const;
 | 
			
		||||
       ///< Returns a pointer to the font which is used to display text with SetText().
 | 
			
		||||
       ///< The parameter FixedFont has the same meaning as in SetText(). The default
 | 
			
		||||
       ///< implementation returns NULL. Therefore a caller of this method must be
 | 
			
		||||
       ///< prepared to receive NULL if the plugin doesn't implement this method.
 | 
			
		||||
       ///< implementation returns the font defined in the setup.
 | 
			
		||||
       ///< The returned pointer is valid a long as the instance of cSkinDisplayMenu
 | 
			
		||||
       ///< exists.
 | 
			
		||||
  };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user