diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-06 13:02:38 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-06 13:02:38 +0100 |
commit | 20cfd2a6bff8c469970651dd73ffee60ab0e5176 (patch) | |
tree | 4f92b38ae97fb0add184ccae97d679f484ef1a49 /Applications/Piano/KeysWidget.cpp | |
parent | c39d44fc2ef0d2e5435524c5b96b5a367df2438b (diff) | |
download | serenity-20cfd2a6bff8c469970651dd73ffee60ab0e5176.zip |
LibGfx: Unpublish Gfx::Rect from global namespace
Diffstat (limited to 'Applications/Piano/KeysWidget.cpp')
-rw-r--r-- | Applications/Piano/KeysWidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Applications/Piano/KeysWidget.cpp b/Applications/Piano/KeysWidget.cpp index 4f7963de3f..aa8c951904 100644 --- a/Applications/Piano/KeysWidget.cpp +++ b/Applications/Piano/KeysWidget.cpp @@ -183,7 +183,7 @@ void KeysWidget::paint_event(GUI::PaintEvent& event) int x = 0; int i = 0; for (;;) { - Rect rect(x, 0, white_key_width, frame_inner_rect().height()); + Gfx::Rect rect(x, 0, white_key_width, frame_inner_rect().height()); painter.fill_rect(rect, m_key_on[note] ? note_pressed_color : Color::White); painter.draw_rect(rect, Color::Black); if (i < white_key_labels_count) { @@ -205,7 +205,7 @@ void KeysWidget::paint_event(GUI::PaintEvent& event) x = white_key_width - black_key_x_offset; i = 0; for (;;) { - Rect rect(x, 0, black_key_width, black_key_height); + Gfx::Rect rect(x, 0, black_key_width, black_key_height); painter.fill_rect(rect, m_key_on[note] ? note_pressed_color : Color::Black); painter.draw_rect(rect, Color::Black); if (i < black_key_labels_count) { @@ -263,7 +263,7 @@ int KeysWidget::note_for_event_position(const Gfx::Point& a_point) const bool black_key_on_left = note != 0 && key_pattern[(note - 1) % notes_per_octave] == Black; if (black_key_on_left) { int black_key_x = (white_keys * white_key_width) - black_key_x_offset; - Rect black_key(black_key_x, 0, black_key_width, black_key_height); + Gfx::Rect black_key(black_key_x, 0, black_key_width, black_key_height); if (black_key.contains(point)) return note - 1; } @@ -271,7 +271,7 @@ int KeysWidget::note_for_event_position(const Gfx::Point& a_point) const bool black_key_on_right = key_pattern[(note + 1) % notes_per_octave] == Black; if (black_key_on_right) { int black_key_x = ((white_keys + 1) * white_key_width) - black_key_x_offset; - Rect black_key(black_key_x, 0, black_key_width, black_key_height); + Gfx::Rect black_key(black_key_x, 0, black_key_width, black_key_height); if (black_key.contains(point)) return note + 1; } |