mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 03:02:30 +00:00
* Allow Frame's to be located in both rows and columns. Improved min
height/width for windows. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@748 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
namespace display {
|
||||
|
||||
WindowStringList::WindowStringList() :
|
||||
Window(new Canvas, true) {
|
||||
Window(new Canvas, flag_width_dynamic | flag_height_dynamic, 0, 0) {
|
||||
}
|
||||
|
||||
WindowStringList::~WindowStringList() {
|
||||
@@ -61,22 +61,22 @@ WindowStringList::redraw() {
|
||||
|
||||
while (itr != m_last) {
|
||||
|
||||
if (ypos == (size_t)m_canvas->get_height()) {
|
||||
if (ypos == (size_t)m_canvas->height()) {
|
||||
ypos = 0;
|
||||
xpos += width + 2;
|
||||
|
||||
if (xpos + 20 >= (size_t)m_canvas->get_width())
|
||||
break;
|
||||
if (xpos + 20 >= (size_t)m_canvas->width())
|
||||
break;
|
||||
|
||||
width = 0;
|
||||
}
|
||||
|
||||
width = std::max(itr->size(), width);
|
||||
|
||||
if (xpos + itr->size() <= (size_t)m_canvas->get_width())
|
||||
if (xpos + itr->size() <= (size_t)m_canvas->width())
|
||||
m_canvas->print(xpos, ypos++, "%s", itr->c_str());
|
||||
else
|
||||
m_canvas->print(xpos, ypos++, "%s", itr->substr(0, m_canvas->get_width() - xpos).c_str());
|
||||
m_canvas->print(xpos, ypos++, "%s", itr->substr(0, m_canvas->width() - xpos).c_str());
|
||||
|
||||
++itr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user