mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:32:44 +00:00 
			
		
		
		
	 a54952795a
			
		
	
	
		a54952795a
		
	
	
	
	
		
			
			The comment appears as a tooltip when hovering over the annotation. A couple of properties of the TextEditor would ideally be set in GML, but either don't have a setter exposed, or the GML compiler doesn't recognise the enum. I'll fix those up after the current big GML compiler PR gets merged.
		
			
				
	
	
		
			91 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			91 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| @HexEditor::EditAnnotationWidget {
 | |
|     layout: @GUI::VerticalBoxLayout {
 | |
|         margins: [4]
 | |
|     }
 | |
|     fill_with_background_color: true
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             margins: [4]
 | |
|         }
 | |
|         preferred_height: "fit"
 | |
| 
 | |
|         @GUI::Label {
 | |
|             text: "Start offset:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::NumericInput {
 | |
|             name: "start_offset"
 | |
|             min: 0
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             margins: [4]
 | |
|         }
 | |
|         preferred_height: "fit"
 | |
| 
 | |
|         @GUI::Label {
 | |
|             text: "End offset:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::NumericInput {
 | |
|             name: "end_offset"
 | |
|             min: 0
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             margins: [4]
 | |
|         }
 | |
|         preferred_height: "fit"
 | |
| 
 | |
|         @GUI::Label {
 | |
|             text: "Color:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::ColorInput {
 | |
|             name: "background_color"
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         layout: @GUI::VerticalBoxLayout {
 | |
|             margins: [4]
 | |
|         }
 | |
|         preferred_height: "fit"
 | |
| 
 | |
|         @GUI::Label {
 | |
|             text: "Comments:"
 | |
|             text_alignment: "CenterLeft"
 | |
|         }
 | |
| 
 | |
|         @GUI::TextEditor {
 | |
|             name: "comments"
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @GUI::Widget {
 | |
|         layout: @GUI::HorizontalBoxLayout {
 | |
|             margins: [4]
 | |
|         }
 | |
|         preferred_height: "fit"
 | |
| 
 | |
|         @GUI::Layout::Spacer {}
 | |
| 
 | |
|         @GUI::DialogButton {
 | |
|             name: "save_button"
 | |
|             text: "Save"
 | |
|         }
 | |
| 
 | |
|         @GUI::DialogButton {
 | |
|             name: "cancel_button"
 | |
|             text: "Cancel"
 | |
|         }
 | |
|     }
 | |
| }
 |