From 963e95cb1a938710215495fc74cf9141912b3659 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 9 Mar 2019 21:38:13 +0100 Subject: [PATCH] GTableView: Minor painting cleanup. --- LibGUI/GFilePicker.h | 10 ++++++++++ LibGUI/GTableView.cpp | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 LibGUI/GFilePicker.h diff --git a/LibGUI/GFilePicker.h b/LibGUI/GFilePicker.h new file mode 100644 index 0000000000..56ea97228b --- /dev/null +++ b/LibGUI/GFilePicker.h @@ -0,0 +1,10 @@ +#include + +class GFilePicker final : public GWindow { +public: + GFilePicker(); + virtual ~GFilePicker() override; + +private: + virtual const char* class_name() const override { return "GFilePicker"; } +}; diff --git a/LibGUI/GTableView.cpp b/LibGUI/GTableView.cpp index f36d998d1c..61f64df896 100644 --- a/LibGUI/GTableView.cpp +++ b/LibGUI/GTableView.cpp @@ -197,8 +197,7 @@ void GTableView::paint_event(GPaintEvent& event) if (is_key_column) { painter.fill_rect(cell_rect.shrunken(2, 2), Color::from_rgb(0xdddddd)); } - painter.set_font(Font::default_bold_font()); - painter.draw_text(cell_rect.translated(horizontal_padding(), 0), m_model->column_name(column_index), TextAlignment::CenterLeft, Color::Black); + painter.draw_text(cell_rect.translated(horizontal_padding(), 0), m_model->column_name(column_index), Font::default_bold_font(), TextAlignment::CenterLeft, Color::Black); x_offset += column_width + horizontal_padding() * 2; // Draw column separator. painter.draw_line(cell_rect.top_left().translated(0, 1), cell_rect.bottom_left().translated(0, -1), Color::White);