mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 10:21:04 +00:00
Fix zoom entry so we can insert numbers with 4 digits
This commit is contained in:
parent
447b2701e4
commit
f8874f4f7b
@ -31,7 +31,8 @@ using namespace gfx;
|
||||
using namespace ui;
|
||||
|
||||
ZoomEntry::ZoomEntry()
|
||||
: IntEntry(0, render::Zoom::linearValues()-1, this)
|
||||
: IntEntry(
|
||||
0, render::Zoom::fromLinearScale(render::Zoom::linearValues()-1).scale()*100, this)
|
||||
, m_locked(false)
|
||||
{
|
||||
setSuffix("%");
|
||||
|
@ -29,7 +29,7 @@ namespace ui {
|
||||
using namespace gfx;
|
||||
|
||||
IntEntry::IntEntry(int min, int max, SliderDelegate* sliderDelegate)
|
||||
: Entry(int(std::ceil(std::log10((double)max)))+1, "")
|
||||
: Entry(int(std::floor(std::log10(double(max))))+1, "")
|
||||
, m_min(min)
|
||||
, m_max(max)
|
||||
, m_slider(m_min, m_max, m_min, sliderDelegate)
|
||||
|
Loading…
x
Reference in New Issue
Block a user