diff gui/win32/widgetrender.c @ 36892:f50427ad9ff6

Internally map item 'potmeter' onto 'hpotmeter'. Former version of the GUI treated a potmeter very similar to a hpotmeter (the Win32 GUI still does so) and lots of skins are solely using potmeters instead of hpotmeters, although this doesn't make sense at all. The current version of the GUI is treating a potmeter differently, but in order to not break old skins, restore the old behaviour. For the X11/GTK GUI, a potmeter is now simply a hpotmeter with button=NULL and (button)width=(button)height=0. For the Win32 GUI (where skins unfortunately are handled a bit differently and things are more complicated) a potmeter is now a hpotmeter without button but (button)width=(widget)width and (button)height=(widget)height. Additionally, print a legacy information, because the item 'potmeter' is obsolete now and oughtn't be used any longer.
author ib
date Mon, 10 Mar 2014 17:32:29 +0000
parents 98568083fb1d
children 049db0aeea85
line wrap: on
line diff
--- a/gui/win32/widgetrender.c	Mon Mar 10 17:15:24 2014 +0000
+++ b/gui/win32/widgetrender.c	Mon Mar 10 17:32:29 2014 +0000
@@ -310,7 +310,7 @@
     if(!img) return;
 
     y = item->y;
-    if(item->type == tyPotmeter)
+    if(/* item->type == tyPotmeter */ /* legacy (potmeter) */ item->type == tyHpotmeter && item->width == item->wwidth)
     {
         height = img->height / item->phases;
         y =  height * (int)(item->value * item->phases / 100);