Remove use of the macro min() from fl_gleam code, since it triggers redefinition warnings on some build hosts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
b6049a3ef4
commit
315fcfa57a
@ -27,11 +27,7 @@
|
|||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
//#include <iostream>
|
|
||||||
|
|
||||||
//using namespace std;
|
|
||||||
|
|
||||||
#define min(A,B) ((A) < (B) ? (A) : (B))
|
|
||||||
|
|
||||||
static void gleam_color(Fl_Color c) {
|
static void gleam_color(Fl_Color c) {
|
||||||
if (Fl::draw_box_active()) fl_color(c);
|
if (Fl::draw_box_active()) fl_color(c);
|
||||||
@ -40,8 +36,8 @@ static void gleam_color(Fl_Color c) {
|
|||||||
|
|
||||||
static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, float th) {
|
static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, float th) {
|
||||||
// Draws the shiny using maximum limits
|
// Draws the shiny using maximum limits
|
||||||
int h_top = min(h/2,20);
|
int h_top = ((h/2) < (20) ? (h/2) : (20)); // min(h/2,20);
|
||||||
int h_bottom = min(h/6,15);
|
int h_bottom = ((h/6) < (15) ? (h/6) : (15)); // min(h/6,15);
|
||||||
int h_flat = h-(h_top+h_bottom);
|
int h_flat = h-(h_top+h_bottom);
|
||||||
int j = 0;
|
int j = 0;
|
||||||
float step_size_top = h_top>1?(0.999/(float)(h_top)):1;
|
float step_size_top = h_top>1?(0.999/(float)(h_top)):1;
|
||||||
|
Loading…
Reference in New Issue
Block a user