mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-24 07:43:35 +00:00
Change Entry::maxSize property from size_t to int
This commit is contained in:
parent
6829b3d5a0
commit
7bc593ac34
@ -31,7 +31,7 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
Entry::Entry(const std::size_t maxsize, const char* format, ...)
|
||||
Entry::Entry(const int maxsize, const char* format, ...)
|
||||
: Widget(kEntryWidget)
|
||||
, m_timer(500, this)
|
||||
, m_maxsize(maxsize)
|
||||
@ -72,7 +72,7 @@ Entry::~Entry()
|
||||
{
|
||||
}
|
||||
|
||||
void Entry::setMaxTextLength(const std::size_t maxsize)
|
||||
void Entry::setMaxTextLength(const int maxsize)
|
||||
{
|
||||
m_maxsize = maxsize;
|
||||
}
|
||||
@ -548,7 +548,7 @@ void Entry::executeCmd(EntryCmd cmd, int unicodeChar, bool shift_pressed)
|
||||
|
||||
// Convert the unicode character -> wstring -> utf-8 string -> insert the utf-8 string
|
||||
if (lastCaretPos() < m_maxsize) {
|
||||
ASSERT((std::size_t)m_caret <= lastCaretPos());
|
||||
ASSERT(m_caret <= lastCaretPos());
|
||||
|
||||
std::wstring unicodeStr;
|
||||
unicodeStr.push_back(unicodeChar);
|
||||
|
@ -18,10 +18,10 @@ namespace ui {
|
||||
|
||||
class Entry : public Widget {
|
||||
public:
|
||||
Entry(const std::size_t maxsize, const char *format, ...);
|
||||
Entry(const int maxsize, const char *format, ...);
|
||||
~Entry();
|
||||
|
||||
void setMaxTextLength(const std::size_t maxsize);
|
||||
void setMaxTextLength(const int maxsize);
|
||||
|
||||
bool isReadOnly() const;
|
||||
void setReadOnly(bool state);
|
||||
@ -104,7 +104,7 @@ namespace ui {
|
||||
|
||||
CharBoxes m_boxes;
|
||||
Timer m_timer;
|
||||
std::size_t m_maxsize;
|
||||
int m_maxsize;
|
||||
int m_caret;
|
||||
int m_scroll;
|
||||
int m_select;
|
||||
|
Loading…
x
Reference in New Issue
Block a user