Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gtk/engine/sugar-info.c
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2007-05-26 17:20:14 (GMT)
committer Benjamin Berg <benjamin@sipsolutions.net>2007-05-26 17:20:14 (GMT)
commitf657d57dd89aca81af269875df9b76b7c5a1f885 (patch)
tree9fd4489cabf96f1ec28d9c19cbb94e9943c98fb3 /gtk/engine/sugar-info.c
parent6f0903ed4e4b22b2ea635b098a62dcb936be0844 (diff)
Support floating point line widths in the engine, and set it to 2.25px.
Diffstat (limited to 'gtk/engine/sugar-info.c')
-rw-r--r--gtk/engine/sugar-info.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/engine/sugar-info.c b/gtk/engine/sugar-info.c
index 727d0a7..452aa3a 100644
--- a/gtk/engine/sugar-info.c
+++ b/gtk/engine/sugar-info.c
@@ -17,7 +17,6 @@
* Boston, MA 02111-1307, USA.
*/
-#include <math.h>
#include <gtk/gtk.h>
#include "sugar-info.h"
@@ -90,17 +89,17 @@ sugar_fill_range_info (SugarRangeInfo *range_info, gboolean trough)
/* The scale trough is drawn larger than it should be. Subtract from its width/height. */
if (trough && (HINT ("vscale") || HINT ("hscale"))) {
- gint width;
+ gdouble width;
switch (range_info->orientation) {
case GTK_ORIENTATION_VERTICAL:
- width = floor((info->pos.width - line_width) / 2.0 + line_width);
+ width = (info->pos.width - line_width) / 2.0 + line_width;
info->pos.x += (info->pos.width - width) / 2;
info->pos.width = width;
break;
case GTK_ORIENTATION_HORIZONTAL:
- width = floor((info->pos.height - line_width) / 2.0 + line_width);
+ width = (info->pos.height - line_width) / 2.0 + line_width;
info->pos.y += (info->pos.height - width) / 2;
info->pos.height = width;