Browse Source

Themes: Define FL_BORDER_BOX in all themes.

tags/v1.3.1000
Jonathan Moore Liles 11 years ago
parent
commit
77fa0ec2da
5 changed files with 50 additions and 4 deletions
  1. +14
    -2
      src/Cairo_Theme.cxx
  2. +8
    -1
      src/Clean_Theme.cxx
  3. +10
    -0
      src/Crystal_Theme.cxx
  4. +10
    -0
      src/Gleam_Theme.cxx
  5. +8
    -1
      src/Vector_Theme.cxx

+ 14
- 2
src/Cairo_Theme.cxx View File

@@ -178,19 +178,31 @@ static void thin_down_box(int x, int y, int w, int h, Fl_Color c)
down_box(x, y, w, h, fl_lighter(c));
}

static void border_box(int x, int y, int w, int h, Fl_Color c)
{
cairo_color(c);

fl_rectf( x,y,w,h );

cairo_color(fl_darker(c));

fl_rect(x,y,w,h);
}

static void
init_theme ( void )
{
Fl::set_boxtype( FL_UP_BOX, up_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_DOWN_BOX, down_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_THIN_UP_BOX, up_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_THIN_DOWN_BOX, down_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_THIN_UP_BOX, thin_up_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_THIN_DOWN_BOX, thin_down_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_UP_FRAME, up_frame, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_DOWN_FRAME, down_frame, DX,DX,DX*2,DX*2 );
/* Fl::set_boxtype( FL_THIN_UP_BOX, thin_up_box, 1,1,1,1 ); */
/* Fl::set_boxtype( FL_THIN_DOWN_BOX, thin_down_box, 1,1,1,1 ); */
Fl::set_boxtype( FL_ROUND_UP_BOX, up_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_ROUND_DOWN_BOX, down_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_BORDER_BOX, border_box, 1,1,2,2 );
}

void


+ 8
- 1
src/Clean_Theme.cxx View File

@@ -73,6 +73,12 @@ static void flat_box( int x, int y, int w, int h, Fl_Color c )
rectf( x, y, w, h, c );
}

static void border_box( int x, int y, int w, int h, Fl_Color c )
{
rectf( x, y, w, h, c );
rect(x, y, w, h, fl_color_average( FL_WHITE, c, 0.2 ) );
}

static void
init_theme ( void )
{
@@ -84,7 +90,8 @@ init_theme ( void )
Fl::set_boxtype( FL_DOWN_FRAME, down_frame, 1,1,2,2 );
Fl::set_boxtype( FL_ROUND_UP_BOX, up_box, 1,1,2,2 );
Fl::set_boxtype( FL_ROUND_DOWN_BOX, down_box, 1,1,2,2 );
Fl::set_boxtype( FL_FLAT_BOX, flat_box, 0, 0, 0, 0 );
// Fl::set_boxtype( FL_FLAT_BOX, flat_box, 0, 0, 0, 0 );
Fl::set_boxtype( FL_BORDER_BOX, border_box, 1,1,2,2 );
}

void


+ 10
- 0
src/Crystal_Theme.cxx View File

@@ -369,6 +369,15 @@ down_round ( int x, int y, int w, int h, Fl_Color c )
frame_round( x, y, w, h, "IJLM", c );
}

static void
border_box ( int x, int y, int w, int h, Fl_Color c )
{
fl_color(c);
fl_rectf( x,y,w,h );
fl_color(fl_darker(c));
fl_rect(x,y,w,h);
}


static void
init_theme ( void )
@@ -384,6 +393,7 @@ init_theme ( void )
Fl::set_boxtype( FL_THIN_DOWN_BOX, down_box, 1,1,2,2 );
Fl::set_boxtype( FL_ROUND_UP_BOX, up_round, 1,1,2,2 );
Fl::set_boxtype( FL_ROUND_DOWN_BOX, down_round, 1,1,2,2 );
Fl::set_boxtype( FL_BORDER_BOX, border_box, 1,1,2,2 );
}

void


+ 10
- 0
src/Gleam_Theme.cxx View File

@@ -146,6 +146,15 @@ static void down_box(int x, int y, int w, int h, Fl_Color c)
//frame_rect(x + 1, y + 1, w - 3, h - 3, fl_color_average(c, FL_BLACK, .65));
}


static void border_box(int x, int y, int w, int h, Fl_Color c)
{
gleam_color(c);
fl_rectf(x,y,w,h);
gleam_color(fl_darker(c));
fl_rect(x+1,y+1,w-2,h-2);
}

static void
init_theme ( void )
{
@@ -158,6 +167,7 @@ init_theme ( void )
Fl::set_boxtype( FL_DOWN_FRAME, down_frame, 2,2,3,3 );
Fl::set_boxtype( FL_ROUND_UP_BOX, up_box, 2,2,3,3 );
Fl::set_boxtype( FL_ROUND_DOWN_BOX, down_box, 2,2,3,3 );
Fl::set_boxtype( FL_BORDER_BOX, border_box, 1,1,2,2 );
}

void


+ 8
- 1
src/Vector_Theme.cxx View File

@@ -115,6 +115,13 @@ static void down_box(int x, int y, int w, int h, Fl_Color bc)
draw_rect( x, y, w, h, bc );
}

static void border_box(int x, int y, int w, int h, Fl_Color bc)
{
cairo_color( interior_color( bc ) );
fl_rectf( x, y, w, h );
cairo_color( border_color( bc ) );
fl_rect( x, y, w, h, bc );
}

static void
init_theme ( void )
@@ -127,7 +134,7 @@ init_theme ( void )
Fl::set_boxtype( FL_DOWN_FRAME, down_frame, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_ROUND_UP_BOX, up_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_ROUND_DOWN_BOX, down_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_BORDER_BOX, up_box, DX,DX,DX*2,DX*2 );
Fl::set_boxtype( FL_BORDER_BOX, border_box, 1,1,2,2 );
}

void


Loading…
Cancel
Save