mirror of
https://github.com/fltk/fltk.git
synced 2026-05-24 00:06:20 +08:00
FLUID: adds better zoom icon
This commit is contained in:
@@ -1159,7 +1159,7 @@ Fl_Menu_Item menu_w_settings_shell_text_macros[] = {
|
||||
{0,0,0,0,0,0,0,0,0}
|
||||
};
|
||||
|
||||
static void cb_square(Fl_Button*, void*) {
|
||||
static void cb_1fd_zoom(Fl_Button*, void*) {
|
||||
if (!script_panel) make_script_panel();
|
||||
script_input->buffer()->text(w_settings_shell_command->buffer()->text());
|
||||
script_panel->show();
|
||||
@@ -2731,11 +2731,10 @@ le");
|
||||
w_settings_shell_text_macros->callback((Fl_Callback*)cb_w_settings_shell_text_macros);
|
||||
w_settings_shell_text_macros->menu(menu_w_settings_shell_text_macros);
|
||||
} // Fl_Menu_Button* w_settings_shell_text_macros
|
||||
{ Fl_Button* o = new Fl_Button(296, 395, 24, 22, "@square");
|
||||
{ Fl_Button* o = new Fl_Button(296, 395, 24, 22, "@+1fd_zoom");
|
||||
o->tooltip("open the big code editor");
|
||||
o->labelsize(11);
|
||||
o->labelcolor(FL_DARK3);
|
||||
o->callback((Fl_Callback*)cb_square);
|
||||
o->callback((Fl_Callback*)cb_1fd_zoom);
|
||||
} // Fl_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
||||
@@ -1228,7 +1228,7 @@ if (mi) {
|
||||
}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label {@square}
|
||||
label {@+1fd_zoom}
|
||||
callback {if (!script_panel) make_script_panel();
|
||||
script_input->buffer()->text(w_settings_shell_command->buffer()->text());
|
||||
script_panel->show();
|
||||
@@ -1244,7 +1244,7 @@ w_settings_shell_command->buffer()->text(script_input->buffer()->text());
|
||||
w_settings_shell_command->do_callback();
|
||||
BREAK2:
|
||||
script_panel->hide();}
|
||||
tooltip {open the big code editor} xywh {296 395 24 22} labelsize 11 labelcolor 39
|
||||
tooltip {open the big code editor} xywh {296 395 24 22} labelsize 11
|
||||
}
|
||||
}
|
||||
Fl_Check_Button {} {
|
||||
|
||||
@@ -91,6 +91,56 @@ Fl_Pixmap *compressed_pixmap;
|
||||
|
||||
Fl_Pixmap *pixmap[Fl_Type::ID_Max_] = { NULL };
|
||||
|
||||
/**
|
||||
Draw a zoom cross pointing in all four diagonal directions
|
||||
*/
|
||||
void fd_zoom(Fl_Color c) {
|
||||
const double al = 0.45, sl = 0.3;
|
||||
|
||||
fl_color(c);
|
||||
|
||||
fl_begin_line();
|
||||
fl_vertex(-1.0, -al);
|
||||
fl_vertex(-1.0, -1.0);
|
||||
fl_vertex(-al, -1.0);
|
||||
fl_end_line();
|
||||
fl_begin_line();
|
||||
fl_vertex(-1.0, -1.0);
|
||||
fl_vertex(-sl, -sl);
|
||||
fl_end_line();
|
||||
|
||||
fl_begin_line();
|
||||
fl_vertex(1.0, -al);
|
||||
fl_vertex(1.0, -1.0);
|
||||
fl_vertex(al, -1.0);
|
||||
fl_end_line();
|
||||
fl_begin_line();
|
||||
fl_vertex(1.0, -1.0);
|
||||
fl_vertex(sl, -sl);
|
||||
fl_end_line();
|
||||
|
||||
fl_begin_line();
|
||||
fl_vertex(-1.0, al);
|
||||
fl_vertex(-1.0, 1.0);
|
||||
fl_vertex(-al, 1.0);
|
||||
fl_end_line();
|
||||
fl_begin_line();
|
||||
fl_vertex(-1.0, 1.0);
|
||||
fl_vertex(-sl, sl);
|
||||
fl_end_line();
|
||||
|
||||
fl_begin_line();
|
||||
fl_vertex(1.0, al);
|
||||
fl_vertex(1.0, 1.0);
|
||||
fl_vertex(al, 1.0);
|
||||
fl_end_line();
|
||||
fl_begin_line();
|
||||
fl_vertex(1.0, 1.0);
|
||||
fl_vertex(sl, sl);
|
||||
fl_end_line();
|
||||
}
|
||||
|
||||
|
||||
void loadPixmaps()
|
||||
{
|
||||
Fl_Pixmap *tmp;
|
||||
@@ -168,5 +218,7 @@ void loadPixmaps()
|
||||
pixmap[Fl_Type::ID_Radio_Menu_Item] = tmp = new Fl_Pixmap(flRadioMenuitem_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Flex] = tmp = new Fl_Pixmap(flFlex_xpm); tmp->scale(16, 16);
|
||||
|
||||
fl_add_symbol("fd_zoom", fd_zoom, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user