mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:52:44 +00:00 
			
		
		
		
	 6d8f046fd0
			
		
	
	
		6d8f046fd0
		
	
	
	
	
		
			
			Rather than having a style AND a field saying whether to use the style, just make the style Optional.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			534 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			534 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 bold { false };
 | |
| 
 | |
|     Optional<UnderlineStyle> underline_style {};
 | |
|     Optional<Color> underline_color {};
 | |
| };
 | |
| 
 | |
| }
 |