mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:32:45 +00:00 
			
		
		
		
	 ece59948c3
			
		
	
	
		ece59948c3
		
	
	
	
	
		
			
			This adds a seperate Color to be used for underlines as well as support for different underline styles.
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			577 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			577 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  * Copyright (c) 2022, Tobias Christiansen <tobyase@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Optional.h>
 | |
| #include <LibGfx/Color.h>
 | |
| 
 | |
| namespace Gfx {
 | |
| 
 | |
| struct TextAttributes {
 | |
|     enum class UnderlineStyle {
 | |
|         Solid,
 | |
|         Wavy
 | |
|     };
 | |
| 
 | |
|     Color color;
 | |
|     Optional<Color> background_color {};
 | |
|     bool underline { false };
 | |
|     bool bold { false };
 | |
| 
 | |
|     Optional<Color> underline_color {};
 | |
|     UnderlineStyle underline_style { UnderlineStyle::Solid };
 | |
| };
 | |
| 
 | |
| }
 |