mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 16:41:52 +00:00
IRCClient+LibGUI: Add an input box so we can send messages to channels.
Implement this using a GTextEditor with a special single-line mode. This new mode needs some polishing, but it's already very useful.
This commit is contained in:
parent
ad08165a25
commit
1fc283ed7d
Notes:
sideshowbarker
2024-07-19 15:02:29 +09:00
Author: https://github.com/awesomekling
Commit: 1fc283ed7d
12 changed files with 126 additions and 23 deletions
|
@ -167,6 +167,7 @@ void GTableView::paint_event(GPaintEvent& event)
|
|||
for (int column_index = 0; column_index < m_model->column_count(); ++column_index) {
|
||||
auto column_metadata = m_model->column_metadata(column_index);
|
||||
int column_width = column_metadata.preferred_width;
|
||||
const Font& font = column_metadata.font ? *column_metadata.font : this->font();
|
||||
bool is_key_column = m_model->key_column() == column_index;
|
||||
Rect cell_rect(horizontal_padding() + x_offset, y, column_width, item_height());
|
||||
if (is_key_column) {
|
||||
|
@ -177,7 +178,7 @@ void GTableView::paint_event(GPaintEvent& event)
|
|||
if (data.is_bitmap())
|
||||
painter.blit(cell_rect.location(), data.as_bitmap(), data.as_bitmap().rect());
|
||||
else
|
||||
painter.draw_text(cell_rect, data.to_string(), column_metadata.text_alignment, text_color);
|
||||
painter.draw_text(cell_rect, data.to_string(), font, column_metadata.text_alignment, text_color);
|
||||
x_offset += column_width + horizontal_padding() * 2;
|
||||
}
|
||||
++painted_item_index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue