mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 10:20:48 +00:00
Merge branch 'master' into beta
This commit is contained in:
commit
3d43b96517
@ -31,11 +31,11 @@ using namespace gfx;
|
|||||||
using namespace ui;
|
using namespace ui;
|
||||||
|
|
||||||
ZoomEntry::ZoomEntry()
|
ZoomEntry::ZoomEntry()
|
||||||
: IntEntry(
|
: IntEntry(0, render::Zoom::linearValues()-1, this)
|
||||||
0, render::Zoom::fromLinearScale(render::Zoom::linearValues()-1).scale()*100, this)
|
|
||||||
, m_locked(false)
|
, m_locked(false)
|
||||||
{
|
{
|
||||||
setSuffix("%");
|
setSuffix("%");
|
||||||
|
setMaxTextLength(6); // strlen("6400.0") == 6
|
||||||
setup_mini_look(this);
|
setup_mini_look(this);
|
||||||
|
|
||||||
setZoom(render::Zoom(1, 1));
|
setZoom(render::Zoom(1, 1));
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
Entry::Entry(std::size_t maxsize, const char* format, ...)
|
Entry::Entry(const std::size_t maxsize, const char* format, ...)
|
||||||
: Widget(kEntryWidget)
|
: Widget(kEntryWidget)
|
||||||
, m_timer(500, this)
|
, m_timer(500, this)
|
||||||
, m_maxsize(maxsize)
|
, m_maxsize(maxsize)
|
||||||
@ -71,6 +71,11 @@ Entry::~Entry()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Entry::setMaxTextLength(const std::size_t maxsize)
|
||||||
|
{
|
||||||
|
m_maxsize = maxsize;
|
||||||
|
}
|
||||||
|
|
||||||
bool Entry::isReadOnly() const
|
bool Entry::isReadOnly() const
|
||||||
{
|
{
|
||||||
return m_readonly;
|
return m_readonly;
|
||||||
|
@ -18,9 +18,11 @@ namespace ui {
|
|||||||
|
|
||||||
class Entry : public Widget {
|
class Entry : public Widget {
|
||||||
public:
|
public:
|
||||||
Entry(std::size_t maxsize, const char *format, ...);
|
Entry(const std::size_t maxsize, const char *format, ...);
|
||||||
~Entry();
|
~Entry();
|
||||||
|
|
||||||
|
void setMaxTextLength(const std::size_t maxsize);
|
||||||
|
|
||||||
bool isPassword() const;
|
bool isPassword() const;
|
||||||
bool isReadOnly() const;
|
bool isReadOnly() const;
|
||||||
void setReadOnly(bool state);
|
void setReadOnly(bool state);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user