mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	LibGUI: Pad GTableView cells on the right side as well.
This commit is contained in:
		
							parent
							
								
									b4c20789fb
								
							
						
					
					
						commit
						fd280a6a03
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-19 15:36:06 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: fd280a6a03
			
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -91,7 +91,7 @@ void GTableView::paint_event(GPaintEvent&) | |||
|             int column_width = column_metadata.preferred_width; | ||||
|             Rect cell_rect(horizontal_padding + x_offset, y, column_width, item_height()); | ||||
|             painter.draw_text(cell_rect, m_model->data(row_index, column_index), column_metadata.text_alignment, text_color); | ||||
|             x_offset += column_width + horizontal_padding; | ||||
|             x_offset += column_width + horizontal_padding * 2; | ||||
|         } | ||||
|         ++painted_item_index; | ||||
|     }; | ||||
|  | @ -107,9 +107,9 @@ void GTableView::paint_event(GPaintEvent&) | |||
|     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; | ||||
|         Rect cell_rect(x_offset, 0, column_width + horizontal_padding, item_height()); | ||||
|         Rect cell_rect(x_offset, 0, column_width + horizontal_padding * 2, item_height()); | ||||
|         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; | ||||
|         x_offset += column_width + horizontal_padding * 2; | ||||
|         painter.draw_line(cell_rect.top_left(), cell_rect.bottom_left(), Color::White); | ||||
|         painter.draw_line(cell_rect.top_right(), cell_rect.bottom_right(), Color::DarkGray); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling