diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-11 23:20:58 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-11 23:21:16 +0200 |
| commit | e2c2ba777362f9d231e8b7281c764132038b8d61 (patch) | |
| tree | 4fef068820f14bdfe49f4d15e826b51f12e93e1f | |
| parent | 86cadec162ed7558c4d5aa8d73c2cf461f53f8c4 (diff) | |
FLUID: adds better zoom icon
| -rw-r--r-- | fluid/alignment_panel.cxx | 7 | ||||
| -rw-r--r-- | fluid/alignment_panel.fl | 4 | ||||
| -rw-r--r-- | fluid/pixmaps.cxx | 52 |
3 files changed, 57 insertions, 6 deletions
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index 0afcd63e3..fdb4acd9c 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -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 diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index 560a2433d..fdea176b9 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -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 {} { diff --git a/fluid/pixmaps.cxx b/fluid/pixmaps.cxx index f8f67fc8f..6f8faa1c6 100644 --- a/fluid/pixmaps.cxx +++ b/fluid/pixmaps.cxx @@ -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); } |
