| 4878 | } |
| 4879 | |
| 4880 | void MessageList::Scroll(int amount, RECT* rcClip, bool shiftAllRects) |
| 4881 | { |
| 4882 | // amount - Amount of pixels to scroll UP |
| 4883 | if (shiftAllRects) |
| 4884 | { |
| 4885 | for (auto& msg : m_messages) |
| 4886 | msg.ShiftUp(amount); |
| 4887 | } |
| 4888 | |
| 4889 | if (GetLocalSettings()->GetMessageStyle() == MS_IMAGE) |
| 4890 | { |
| 4891 | // nope, just invalidate |
| 4892 | InvalidateRect(m_hwnd, NULL, FALSE); |
| 4893 | return; |
| 4894 | } |
| 4895 | |
| 4896 | // Note. In the case that any repainting is done, we perform the shifts |
| 4897 | // BEFORE repainting to avoid some weird glitches caused by a shift occuring |
| 4898 | // twice. |
| 4899 | ScrollWindowEx(m_hwnd, 0, -amount, rcClip, NULL, NULL, NULL, SW_INVALIDATE); |
| 4900 | UpdateWindow(m_hwnd); |
| 4901 | } |
| 4902 | |
| 4903 | void MessageList::MessageHeightChanged(int oldHeight, int newHeight, bool toStart) |
| 4904 | { |
no test coverage detected