mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 23:37:02 +08:00
Some more size adjustments so smaller fonts look better
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1068 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+11
-11
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Color_Chooser.cxx,v 1.7 1999/03/07 08:51:43 bill Exp $"
|
||||
// "$Id: Fl_Color_Chooser.cxx,v 1.7.2.1 2000/04/14 09:08:12 bill Exp $"
|
||||
//
|
||||
// Color chooser for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -324,10 +324,10 @@ Fl_Color_Chooser::Fl_Color_Chooser(int X, int Y, int W, int H, const char* L)
|
||||
huebox(0,0,100,100),
|
||||
valuebox(100,0,20,100),
|
||||
choice(120,0,60,20),
|
||||
rvalue(120,20,60,25),
|
||||
gvalue(120,45,60,25),
|
||||
bvalue(120,70,60,25),
|
||||
resize_box(0,95,100,5)
|
||||
rvalue(120,20,60,23),
|
||||
gvalue(120,43,60,23),
|
||||
bvalue(120,66,60,23),
|
||||
resize_box(0,89,100,9)
|
||||
{
|
||||
end();
|
||||
resizable(resize_box);
|
||||
@@ -384,15 +384,15 @@ extern const char* fl_ok;
|
||||
extern const char* fl_cancel;
|
||||
|
||||
int fl_color_chooser(const char* name, double& r, double& g, double& b) {
|
||||
Fl_Window window(210,165,name);
|
||||
Fl_Window window(210,153,name);
|
||||
Fl_Color_Chooser chooser(5, 5, 200, 95);
|
||||
ColorChip ok_color(5, 105, 95, 30);
|
||||
Fl_Return_Button ok_button(5, 135, 95, 25, fl_ok);
|
||||
ColorChip cancel_color(110, 105, 95, 30);
|
||||
ColorChip ok_color(5, 105, 95, 23);
|
||||
Fl_Return_Button ok_button(5, 128, 95, 23, fl_ok);
|
||||
ColorChip cancel_color(110, 105, 95, 23);
|
||||
cancel_color.r = uchar(255*r+.5); ok_color.r = cancel_color.r;
|
||||
ok_color.g = cancel_color.g = uchar(255*g+.5);
|
||||
ok_color.b = cancel_color.b = uchar(255*b+.5);
|
||||
Fl_Button cancel_button(110, 135, 95, 25, fl_cancel);
|
||||
Fl_Button cancel_button(110, 128, 95, 23, fl_cancel);
|
||||
window.resizable(chooser);
|
||||
chooser.rgb(r,g,b);
|
||||
chooser.callback(chooser_cb, &ok_color);
|
||||
@@ -431,5 +431,5 @@ int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Color_Chooser.cxx,v 1.7 1999/03/07 08:51:43 bill Exp $".
|
||||
// End of "$Id: Fl_Color_Chooser.cxx,v 1.7.2.1 2000/04/14 09:08:12 bill Exp $".
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_file_chooser.cxx,v 1.10.2.1 2000/04/04 17:57:03 bill Exp $"
|
||||
// "$Id: fl_file_chooser.cxx,v 1.10.2.2 2000/04/14 09:08:14 bill Exp $"
|
||||
//
|
||||
// File chooser widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -488,13 +488,13 @@ static void files_cb(Fl_Widget* obj, void* v) { // file pattern buttons
|
||||
|
||||
/*----------------------- The Main Routine ----------------------*/
|
||||
#define HEIGHT_BOX (4*WIDTH_SPC+HEIGHT_BUT+HEIGHT_INPUT+HEIGHT_BROWSER)
|
||||
#define HEIGHT_BUT 25
|
||||
#define HEIGHT_INPUT 30
|
||||
#define HEIGHT_BUT 23
|
||||
#define HEIGHT_INPUT 23
|
||||
#define HEIGHT_BROWSER (9*HEIGHT_BUT+2) // must be > buttons*HEIGHT_BUT
|
||||
#define WIDTH_BOX (3*WIDTH_SPC+WIDTH_BUT+WIDTH_BROWSER)
|
||||
#define WIDTH_BROWSER 350
|
||||
#define WIDTH_BUT 125
|
||||
#define WIDTH_OK 70
|
||||
#define WIDTH_OK 60
|
||||
#define WIDTH_SPC 5
|
||||
|
||||
int FCW::handle(int event) {
|
||||
@@ -572,7 +572,7 @@ FCW::FCW() : Fl_Window(WIDTH_BOX, HEIGHT_BOX),
|
||||
but_y += HEIGHT_BUT;
|
||||
|
||||
resizable(new Fl_Box(browser.x(), but_y,
|
||||
cancel_button->x()-browser.x(),
|
||||
ok_button->x()-browser.x(),
|
||||
browser.y()+browser.h()-but_y));
|
||||
// add(input); // put last for better draw() speed
|
||||
end();
|
||||
@@ -622,5 +622,5 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: fl_file_chooser.cxx,v 1.10.2.1 2000/04/04 17:57:03 bill Exp $".
|
||||
// End of "$Id: fl_file_chooser.cxx,v 1.10.2.2 2000/04/14 09:08:14 bill Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user