Fix zoom entry so we can insert numbers with 4 digits

This commit is contained in:
David Capello 2016-12-16 14:53:26 -03:00
parent 447b2701e4
commit f8874f4f7b
2 changed files with 3 additions and 2 deletions

View File

@ -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("%");

View File

@ -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)