JulNadeauCA / libagar

Cross-Platform GUI Toolkit (stable)
https://libagar.org/
BSD 2-Clause "Simplified" License
401 stars 42 forks source link

AG_ProgressBarSetWidth does nothing #82

Open scaramacai opened 7 months ago

scaramacai commented 7 months ago

May be related to #81 ? I tried to modify widgets.c in agartest to vary the width of the horizontal progress bar, but nothing happens

--- widgets.c.orig  2024-04-10 03:26:54.000000000 +0200
+++ widgets.c      2024-04-21 08:13:39.214345473 +0200
@@ -526,6 +526,7 @@
                pb = AG_ProgressBarNewHoriz(hBox, AG_PROGRESS_BAR_EXCL |
                                                  AG_PROGRESS_BAR_SHOW_PCT |
                                                  AG_PROGRESS_BAR_HFILL);
+               AG_ProgressBarSetWidth(pb, 2);
                AG_BindInt(pb, "value", &myVal);
                AG_BindInt(pb, "min", &myMin);
                AG_BindInt(pb, "max", &myMax);
JulNadeauCA commented 6 months ago

I'm currently working on adding a proper width attribute to the style engine so you'll be able to use something like: AG_SetStyle(pb, "width", "2"). The AG_ProgressBarSetWidth() will likely be deprecated.