summaryrefslogtreecommitdiff
path: root/Applications/Piano
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/Piano')
-rw-r--r--Applications/Piano/KeysWidget.cpp8
-rw-r--r--Applications/Piano/RollWidget.cpp2
2 files changed, 5 insertions, 5 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;
}
diff --git a/Applications/Piano/RollWidget.cpp b/Applications/Piano/RollWidget.cpp
index e39206788d..8b2a8f93cd 100644
--- a/Applications/Piano/RollWidget.cpp
+++ b/Applications/Piano/RollWidget.cpp
@@ -80,7 +80,7 @@ void RollWidget::paint_event(GUI::PaintEvent& event)
int x_pos = x * note_width;
int next_x_pos = (x + 1) * note_width;
int distance_to_next_x = next_x_pos - x_pos;
- Rect rect(x_pos, y_pos, distance_to_next_x, note_height);
+ Gfx::Rect rect(x_pos, y_pos, distance_to_next_x, note_height);
if (m_roll_notes[y + note_offset][x] == On)
painter.fill_rect(rect, note_pressed_color);