summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-01-20 15:34:14 +0100
committerMatthias Melcher <github@matthiasm.com>2023-01-20 15:34:14 +0100
commitcd5301ac37cf05440ae3cff03dc3fdcea15af68d (patch)
treeb1e7d83acf0a58127c59ebb19a01fb9580899455 /fluid
parentb19c0e4f6388efe49455d6b8dba6c9cc2f8674c5 (diff)
STR 2843: FLUID align evenly now prefers correct gap size over correct width
Diffstat (limited to 'fluid')
-rw-r--r--fluid/align_widget.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx
index 37c4255e1..d66a0cc70 100644
--- a/fluid/align_widget.cxx
+++ b/fluid/align_widget.cxx
@@ -254,6 +254,7 @@ void align_widget_cb(Fl_Widget*, long how)
n--;
if (n>0)
{
+ wdt = wdt/n*n; // make sure that all gaps are the same, possibly moving the rightmost widget
int cnt = 0, wsum = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_widget())
@@ -295,6 +296,7 @@ void align_widget_cb(Fl_Widget*, long how)
n--;
if (n>0)
{
+ hgt = hgt/n*n; // make sure that all gaps are the same, possibly moving the rightmost widget
int cnt = 0, hsum = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_widget())