From 5e8adebac2899d60fffc53d4692bc4972abcf795 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 3 Sep 2023 00:09:32 +0200 Subject: Adds compact buttons feature to create keypads. See test/buttons for an example. --- fluid/widget_panel.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'fluid/widget_panel.cxx') diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx index 4bb22b797..12976268b 100644 --- a/fluid/widget_panel.cxx +++ b/fluid/widget_panel.cxx @@ -803,10 +803,16 @@ sized to fit the container."); } // Fl_Menu_Button* o o->end(); } // Fl_Group* o - { Fl_Box* o = new Fl_Box(95, 140, 300, 40); + { Fl_Box* o = new Fl_Box(95, 165, 300, 40); o->labelsize(11); Fl_Group::current()->resizable(o); } // Fl_Box* o + { Fl_Light_Button* o = new Fl_Light_Button(95, 140, 90, 20, "Compact"); + o->tooltip("use compact box types for closely set buttons"); + o->selection_color((Fl_Color)1); + o->labelsize(11); + o->callback((Fl_Callback*)compact_cb); + } // Fl_Light_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 30, 400, 330, "C++"); -- cgit v1.2.3