mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:42:43 +00:00 
			
		
		
		
	 0f42908073
			
		
	
	
		0f42908073
		
	
	
	
	
		
			
			LibHTML will now use the palette colors for the default document background and the text. As always, a page can override this default styling with CSS if it really wants a specific color or style. Fixes https://github.com/SerenityOS/serenity/issues/963
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			665 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			665 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <LibGUI/GPainter.h>
 | |
| #include <LibHTML/Layout/LayoutListItemMarker.h>
 | |
| 
 | |
| LayoutListItemMarker::LayoutListItemMarker()
 | |
|     : LayoutBox(nullptr, StyleProperties::create())
 | |
| {
 | |
| }
 | |
| 
 | |
| LayoutListItemMarker::~LayoutListItemMarker()
 | |
| {
 | |
| }
 | |
| 
 | |
| void LayoutListItemMarker::render(RenderingContext& context)
 | |
| {
 | |
|     Rect bullet_rect { 0, 0, 4, 4 };
 | |
|     bullet_rect.center_within(enclosing_int_rect(rect()));
 | |
|     // FIXME: It would be nicer to not have to go via the parent here to get our inherited style.
 | |
|     auto color = parent()->style().color_or_fallback(CSS::PropertyID::Color, document(), context.palette().base_text());
 | |
|     context.painter().fill_rect(bullet_rect, color);
 | |
| }
 |