Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Oct 21, 2024
1 parent 6cbd785 commit 5c0622b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/features/ImprovedScaleAndRotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ToggleSnapButton : public CCMenuItemSpriteExtra {
}

void updateSprite() {
m_sprite->setString(numToString(m_snaps[m_ix]).c_str());
m_sprite->setString(numToString(m_snaps[m_ix], 2).c_str());
m_sprite->m_label->setScale(.7f);
auto size = m_sprite->getScaledContentSize();
m_sprite->setPosition(size / 2);
Expand Down Expand Up @@ -225,9 +225,9 @@ class $modify(SnappableScaleControl, GJScaleControl) {
static std::array SNAPS { 1.f / 3, .25f, .2f, 1.f / 6, .1f };
auto snapSizeBtn = ToggleSnapButton::create(
SNAPS, [snapLinesX, snapLinesY, snapLinesXY](float snap) {
snapLinesX->updateSnapSize(snap);
snapLinesY->updateSnapSize(snap);
snapLinesXY->updateSnapSize(snap);
snapLinesX->updateSnapSize(size_t(1.f / snap));
snapLinesY->updateSnapSize(size_t(1.f / snap));
snapLinesXY->updateSnapSize(size_t(1.f / snap));
}
);
snapSizeBtn->setEnabled(false);
Expand Down

0 comments on commit 5c0622b

Please sign in to comment.