[MPlayer-cvslog] r37989 - trunk/gui/win32/widgetrender.c
ib
subversion at mplayerhq.hu
Mon Oct 9 17:46:35 EEST 2017
Author: ib
Date: Mon Oct 9 17:46:35 2017
New Revision: 37989
Log:
Make Win32 GUI's widget renderer more compatible
The X11/GTK GUI renderer will not draw anything, if the image generated
from a label is empty.
The Win32 GUI renderer always repaints the background of a label image
prior to drawing the image generated from the label itself. Prevent the
renderer from doing this by checking whether there actually will be any
text to be rendered at all. (This is no 100% compatibility, but good
enough for existing skins.)
Modified:
trunk/gui/win32/widgetrender.c
Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c Mon Oct 9 15:51:58 2017 (r37988)
+++ trunk/gui/win32/widgetrender.c Mon Oct 9 17:46:35 2017 (r37989)
@@ -314,7 +314,9 @@ void renderinfobox(skin_t *skin, window_
for (i=0; i<skin->widgetcount; i++)
if((skin->widgets[i]->type == tyDlabel) || (skin->widgets[i]->type == tySlabel))
{
- if(skin->widgets[i]->window == priv->type)
+ char *text = generatetextfromlabel(skin->widgets[i]);
+
+ if(*text && (skin->widgets[i]->window == priv->type))
render(skin->desktopbpp,
&priv->img,
find_background(skin, skin->widgets[i]),
@@ -325,6 +327,8 @@ void renderinfobox(skin_t *skin, window_
skin->widgets[i]->length,
skin->widgets[i]->font->chars[0]->height,
1);
+
+ free(text);
}
/* load all slabels and dlabels */
More information about the MPlayer-cvslog
mailing list