AnchorLayout: Allow centering separately for horizontal and vertical

This commit is contained in:
Henrik Rydgård committed 2025-11-10 12:10:08 +01:00
1 parent 0453fb5449
commit 9de8e75709
16 files changed
+71 -61

No files matched your search

+1 -1
View File
@@ -94,7 +94,7 @@ private:
class ButtonPreview : public UI::View {
public:
ButtonPreview(ImageID bgImg, ImageID img, float rotationIcon, bool flipShape, float rotationShape, int x, int y)
: View(new UI::AnchorLayoutParams(x, y, UI::NONE, UI::NONE, true)), bgImg_(bgImg), img_(img), rotI_(rotationIcon),
: View(new UI::AnchorLayoutParams(x, y, UI::NONE, UI::NONE, UI::Centering::Both)), bgImg_(bgImg), img_(img), rotI_(rotationIcon),
flipS_(flipShape), rotS_(rotationShape), x_(x), y_(y) {}
void Draw(UIContext &dc) override {