mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:28:12 +00:00
GTableView: Minor painting cleanup.
This commit is contained in:
parent
0a7137617d
commit
963e95cb1a
2 changed files with 11 additions and 2 deletions
10
LibGUI/GFilePicker.h
Normal file
10
LibGUI/GFilePicker.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include <LibGUI/GWindow.h>
|
||||||
|
|
||||||
|
class GFilePicker final : public GWindow {
|
||||||
|
public:
|
||||||
|
GFilePicker();
|
||||||
|
virtual ~GFilePicker() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual const char* class_name() const override { return "GFilePicker"; }
|
||||||
|
};
|
|
@ -197,8 +197,7 @@ void GTableView::paint_event(GPaintEvent& event)
|
||||||
if (is_key_column) {
|
if (is_key_column) {
|
||||||
painter.fill_rect(cell_rect.shrunken(2, 2), Color::from_rgb(0xdddddd));
|
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), Font::default_bold_font(), TextAlignment::CenterLeft, Color::Black);
|
||||||
painter.draw_text(cell_rect.translated(horizontal_padding(), 0), m_model->column_name(column_index), TextAlignment::CenterLeft, Color::Black);
|
|
||||||
x_offset += column_width + horizontal_padding() * 2;
|
x_offset += column_width + horizontal_padding() * 2;
|
||||||
// Draw column separator.
|
// Draw column separator.
|
||||||
painter.draw_line(cell_rect.top_left().translated(0, 1), cell_rect.bottom_left().translated(0, -1), Color::White);
|
painter.draw_line(cell_rect.top_left().translated(0, 1), cell_rect.bottom_left().translated(0, -1), Color::White);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue