diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-11-01 17:22:31 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-11-01 17:22:40 +0100 |
| commit | aaaf0a0537e03cec7a47330550a31bb4e96dacde (patch) | |
| tree | 820ea79b85ed1e3b9fdcfe9ef0b2fc16a15c5cc6 /fluid/Fl_Grid_Type.cxx | |
| parent | 5f836377a0f4e5c7b90b06ba4b4fefc3ccf04a39 (diff) | |
FLUID: Adds options to draw ghosted outlines.
Diffstat (limited to 'fluid/Fl_Grid_Type.cxx')
| -rw-r--r-- | fluid/Fl_Grid_Type.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fluid/Fl_Grid_Type.cxx b/fluid/Fl_Grid_Type.cxx index dfcbe3d28..fa1e83604 100644 --- a/fluid/Fl_Grid_Type.cxx +++ b/fluid/Fl_Grid_Type.cxx @@ -49,6 +49,25 @@ void Fl_Grid_Proxy::resize(int X, int Y, int W, int H) { redraw(); } +/** + Override draw() to make groups with no box or flat box background visible. + */ +void Fl_Grid_Proxy::draw() { + if (show_ghosted_outline) { + if (!box()) { + fl_rect(x(), y(), w(), h(), Fl::box_color(fl_color_average(FL_FOREGROUND_COLOR, color(), .1f))); + Fl_Grid::draw(); + } else if (box() == FL_FLAT_BOX && parent() && parent()->color() == color()) { + Fl_Grid::draw(); + fl_rect(x(), y(), w(), h(), Fl::box_color(fl_color_average(FL_FOREGROUND_COLOR, color(), .1f))); + } else { + Fl_Grid::draw(); + } + } else { + Fl_Grid::draw(); + } +} + Fl_Grid_Type::Fl_Grid_Type() { } |
