Skip to content

Commit

Permalink
Merge pull request #196 from Pac72/round-weight
Browse files Browse the repository at this point in the history
Round UISplitPane weight in "Copy Layout to Clipboard"
  • Loading branch information
nakst authored Mar 4, 2025
2 parents e34738b + 32ab49d commit 70241a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gf2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ void GenerateLayoutString(UIElement *e, Array<char> *sb)
sb->Add('h');
}
sb->Add('(');
int n = snprintf(buf, sizeof(buf), "%d", (int)(((UISplitPane*)e)->weight*100));
int n = snprintf(buf, sizeof(buf), "%d", (int)(((UISplitPane*)e)->weight*100 + 0.5));
sb->AddMany(buf, n);
sb->Add(',');
GenerateLayoutString(e->children[1], sb);
Expand Down

0 comments on commit 70241a9

Please sign in to comment.