mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:12:43 +00:00 
			
		
		
		
	 548081ea23
			
		
	
	
		548081ea23
		
	
	
	
	
		
			
			Instead of defaulting to "bold variant of the system default font", let's allow the user to set any font they want as the titlebar font.
		
			
				
	
	
		
			93 lines
		
	
	
	
		
			2.1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			93 lines
		
	
	
	
		
			2.1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| @GUI::Widget {
 | |
|     fill_with_background_color: true
 | |
|     layout: @GUI::VerticalBoxLayout {
 | |
|         margins: [8]
 | |
|         spacing: 8
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         preferred_height: "fit"
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             spacing: 6
 | |
|         }
 | |
| 
 | |
|         @GUI::Label {
 | |
|             fixed_width: 100
 | |
|             text: "Default font:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::Label {
 | |
|             background_role: "Base"
 | |
|             shadow: "Sunken"
 | |
|             shape: "Container"
 | |
|             thickness: 2
 | |
|             fill_with_background_color: true
 | |
|             name: "default_font_label"
 | |
|         }
 | |
| 
 | |
|         @GUI::Button {
 | |
|             text: "..."
 | |
|             name: "default_font_button"
 | |
|             fixed_width: 30
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         preferred_height: "fit"
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             spacing: 6
 | |
|         }
 | |
| 
 | |
|         @GUI::Label {
 | |
|             fixed_width: 100
 | |
|             text: "Window title font:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::Label {
 | |
|             background_role: "Base"
 | |
|             shadow: "Sunken"
 | |
|             shape: "Container"
 | |
|             thickness: 2
 | |
|             fill_with_background_color: true
 | |
|             name: "window_title_font_label"
 | |
|         }
 | |
| 
 | |
|         @GUI::Button {
 | |
|             text: "..."
 | |
|             name: "window_title_font_button"
 | |
|             fixed_width: 30
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         preferred_height: "fit"
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             spacing: 6
 | |
|         }
 | |
| 
 | |
|         @GUI::Label {
 | |
|             fixed_width: 100
 | |
|             text: "Fixed-width font:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::Label {
 | |
|             background_role: "Base"
 | |
|             shadow: "Sunken"
 | |
|             shape: "Container"
 | |
|             thickness: 2
 | |
|             fill_with_background_color: true
 | |
|             name: "fixed_width_font_label"
 | |
|         }
 | |
| 
 | |
|         @GUI::Button {
 | |
|             text: "..."
 | |
|             name: "fixed_width_font_button"
 | |
|             fixed_width: 30
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Layout::Spacer {}
 | |
| }
 |