mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 06:39:23 +00:00
* Moved handling of events from DownloadList into ElementDownloadList
and WindowLog. * Added bindings to input::TextInput and disabled other bindings while it is active. * ^K now sets ignore_commands. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@750 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -221,6 +221,27 @@ Frame::refresh() {
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Frame::redraw() {
|
||||
switch (m_type) {
|
||||
case TYPE_NONE:
|
||||
break;
|
||||
|
||||
case TYPE_WINDOW:
|
||||
if (m_window->is_active() && !m_window->is_offscreen())
|
||||
m_window->redraw();
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_ROW:
|
||||
case TYPE_COLUMN:
|
||||
for (Frame **itr = m_container, **last = m_container + m_containerSize; itr != last; ++itr)
|
||||
(*itr)->redraw();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Frame::balance(uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
|
||||
m_positionX = x;
|
||||
@@ -289,6 +310,10 @@ Frame::balance(uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
|
||||
(*itr)->m_width = s;
|
||||
}
|
||||
|
||||
// Use the pre-calculated frame sizes to balance the sub-frames. If
|
||||
// the frame is too small, it will set the remaining windows to zero
|
||||
// extent which will flag them as offscreen.
|
||||
|
||||
for (Frame **itr = m_container, **last = m_container + m_containerSize; itr != last; ++itr) {
|
||||
if (m_type == TYPE_ROW) {
|
||||
(*itr)->balance(x, y, m_width, std::min((*itr)->m_height, height));
|
||||
|
||||
Reference in New Issue
Block a user