1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--- d4x-2.4.1/main/face/lod.cc.orig 2003-03-23 21:53:23.000000000 +0200
+++ d4x-2.4.1/main/face/lod.cc 2003-03-23 22:27:08.000000000 +0200
@@ -196,6 +196,7 @@
GtkCellRendererState flags){
char tmpc[100];
float p=((GtkCellRendererProgress*)cell)->percent;
+ unsigned int pwidth;
if (p>99.0 && p<100.0)
sprintf(tmpc,"%.1f",p);
@@ -246,13 +247,15 @@
};
case 1:
if (p<=0) break;
+ pwidth = (unsigned int)((cell_area->width*p)/100);
+ if (pwidth<=0) break;
gtk_paint_box(style,window,
GTK_STATE_PRELIGHT,GTK_SHADOW_OUT,
cell_area,
widget,
"bar",
cell_area->x,cell_area->y,
- int((cell_area->width*p)/100),cell_area->height);
+ pwidth,cell_area->height);
default:
break;
};
|