diff --git a/src/spek-spectrogram.cc b/src/spek-spectrogram.cc index 8391b92..970f462 100644 --- a/src/spek-spectrogram.cc +++ b/src/spek-spectrogram.cc @@ -136,6 +136,16 @@ void SpekSpectrogram::render(wxDC& dc) // Draw the spectrogram. wxBitmap bmp(this->image.Scale(w - LPAD - RPAD, h - TPAD - BPAD /*TODO:, wxIMAGE_QUALITY_HIGH*/)); dc.DrawBitmap(bmp, LPAD, TPAD); + + // File name. + dc.SetFont(large_font); + // TODO: ellipsize + dc.DrawText(this->path, LPAD, TPAD - 2 * GAP - normal_height - large_height); + + // File properties. + dc.SetFont(normal_font); + // TODO: ellipsize + dc.DrawText(this->desc, LPAD, TPAD - GAP - normal_height); } // Border around the spectrogram. diff --git a/src/spek-spectrogram.vala b/src/spek-spectrogram.vala index cdc77a6..3d1e7c2 100644 --- a/src/spek-spectrogram.vala +++ b/src/spek-spectrogram.vala @@ -92,25 +92,6 @@ namespace Spek { cr.translate (LPAD, TPAD); rate_ruler.draw (cr, layout); cr.identity_matrix (); - - // File properties. - cr.move_to (LPAD, TPAD - GAP); - layout.set_font_description (FontDescription.from_string ( - "Sans " + (9 * FONT_SCALE).to_string ())); - layout.set_width ((int) (w - LPAD - RPAD) * Pango.SCALE); - layout.set_ellipsize (EllipsizeMode.END); - layout.set_text (info, -1); - cairo_show_layout_line (cr, layout.get_line (0)); - layout.get_pixel_size (out text_width, out text_height); - - // File name. - cr.move_to (LPAD, TPAD - 2 * GAP - text_height); - layout.set_font_description (FontDescription.from_string ( - "Sans Bold " + (10 * FONT_SCALE).to_string ())); - layout.set_width ((int) (w - LPAD - RPAD) * Pango.SCALE); - layout.set_ellipsize (EllipsizeMode.START); - layout.set_text (file_name, -1); - cairo_show_layout_line (cr, layout.get_line (0)); } // Prepare to draw the ruler.