mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
Move some more classes to the new coding style.
This commit is contained in:
parent
a2ec09bc20
commit
7750e6952b
20 changed files with 113 additions and 114 deletions
|
@ -34,12 +34,12 @@ WSScreen::~WSScreen()
|
|||
void WSScreen::on_receive_mouse_data(int dx, int dy, bool left_button, bool right_button)
|
||||
{
|
||||
auto prev_location = m_cursor_location;
|
||||
m_cursor_location.moveBy(dx, dy);
|
||||
m_cursor_location.move_by(dx, dy);
|
||||
m_cursor_location.constrain(rect());
|
||||
if (m_cursor_location.x() >= width())
|
||||
m_cursor_location.setX(width() - 1);
|
||||
m_cursor_location.set_x(width() - 1);
|
||||
if (m_cursor_location.y() >= height())
|
||||
m_cursor_location.setY(height() - 1);
|
||||
m_cursor_location.set_y(height() - 1);
|
||||
if (m_cursor_location != prev_location) {
|
||||
auto event = make<MouseEvent>(WSEvent::MouseMove, m_cursor_location.x(), m_cursor_location.y());
|
||||
WSEventLoop::the().post_event(&WSWindowManager::the(), move(event));
|
||||
|
|
|
@ -128,8 +128,8 @@ WSWindowManager::WSWindowManager()
|
|||
m_inactiveWindowBorderColor = Color(64, 64, 64);
|
||||
m_inactiveWindowTitleColor = Color::White;
|
||||
|
||||
m_cursor_bitmap_inner = CharacterBitmap::createFromASCII(cursor_bitmap_inner_ascii, 12, 17);
|
||||
m_cursor_bitmap_outer = CharacterBitmap::createFromASCII(cursor_bitmap_outer_ascii, 12, 17);
|
||||
m_cursor_bitmap_inner = CharacterBitmap::create_from_ascii(cursor_bitmap_inner_ascii, 12, 17);
|
||||
m_cursor_bitmap_outer = CharacterBitmap::create_from_ascii(cursor_bitmap_outer_ascii, 12, 17);
|
||||
|
||||
invalidate();
|
||||
compose();
|
||||
|
@ -237,7 +237,7 @@ void WSWindowManager::processMouseEvent(MouseEvent& event)
|
|||
auto old_window_rect = m_dragWindow->rect();
|
||||
Point pos = m_dragWindowOrigin;
|
||||
printf("[WM] Dragging [origin: %d,%d] now: %d,%d\n", m_dragOrigin.x(), m_dragOrigin.y(), event.x(), event.y());
|
||||
pos.moveBy(event.x() - m_dragOrigin.x(), event.y() - m_dragOrigin.y());
|
||||
pos.move_by(event.x() - m_dragOrigin.x(), event.y() - m_dragOrigin.y());
|
||||
m_dragWindow->set_position_without_repaint(pos);
|
||||
invalidate(outerRectForWindow(old_window_rect));
|
||||
invalidate(outerRectForWindow(m_dragWindow->rect()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue