summaryrefslogtreecommitdiff
path: root/src/Fl_Anim_GIF_Image.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2025-12-01 22:58:13 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2025-12-01 23:06:37 +0100
commitfeed81e124fe5fd07854e9ab2066beddb0ea8fc9 (patch)
tree9f2a466dd3a531d0f1022abd78f13da473df538c /src/Fl_Anim_GIF_Image.cxx
parent5a6a7eb009cde5c0613418a11b0fb637f0cd9468 (diff)
Fix more box drawing stuff - using Fl::box_bg(box())
The biggest changes are in src/Fl_Scroll.cxx where most of the changes are caused only by formatting (alignment). The behavior is the same for all boxtypes that had been covered by the old switch/case code and should be improved for other FL_*_FRAME boxtypes that had been ignored.
Diffstat (limited to 'src/Fl_Anim_GIF_Image.cxx')
-rw-r--r--src/Fl_Anim_GIF_Image.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/Fl_Anim_GIF_Image.cxx b/src/Fl_Anim_GIF_Image.cxx
index cd04f9467..c70d15866 100644
--- a/src/Fl_Anim_GIF_Image.cxx
+++ b/src/Fl_Anim_GIF_Image.cxx
@@ -2,6 +2,7 @@
// Fl_Anim_GIF_Image class for the Fast Light Tool Kit (FLTK).
//
// Copyright 2016-2023 by Christian Grabner <wcout@gmx.net>.
+// Copyright 2024-2025 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -1195,21 +1196,24 @@ void Fl_Anim_GIF_Image::set_frame(int frame) {
Fl_Widget* cv = canvas();
if (cv) {
Fl_Group* parent = cv->parent();
- bool no_bg = (cv->box() == FL_NO_BOX);
+ bool no_bg = !Fl::box_bg(cv->box());
bool outside = (!(cv->align() & FL_ALIGN_INSIDE) && !((cv->align() & FL_ALIGN_POSITION_MASK)==FL_ALIGN_CENTER));
-// bool dispose = (fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_BACKGROUND)
-// || (fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_PREVIOUS);
+ // bool dispose = (fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_BACKGROUND)
+ // || (fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_PREVIOUS);
if (parent && (no_bg || outside))
parent->redraw();
else
cv->redraw();
-// Note: the code below did not animate labels with a pixmap outside of the canvas
-// canvas()->parent() &&
-// (frame_ == 0 || (last_frame >= 0 && (fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_BACKGROUND ||
-// fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_PREVIOUS))) &&
-// (canvas()->box() == FL_NO_BOX || (canvas()->align() && !(canvas()->align() & FL_ALIGN_INSIDE))) ?
-// canvas()->parent()->redraw() : canvas()->redraw();
+ // Note: the code below did not animate labels with a pixmap outside of the canvas.
+ // Todo: Replace 'canvas()->box() == FL_NO_BOX' with '!Fl::box_bg(canvas()->box())'
+ // if the code below is ever uncommented again. Maybe this would fix it?
+ //
+ // canvas()->parent() &&
+ // (frame_ == 0 || (last_frame >= 0 && (fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_BACKGROUND ||
+ // fi_->frames[last_frame].dispose == FrameInfo::DISPOSE_PREVIOUS))) &&
+ // (canvas()->box() == FL_NO_BOX || (canvas()->align() && !(canvas()->align() & FL_ALIGN_INSIDE))) ?
+ // canvas()->parent()->redraw() : canvas()->redraw();
}
}