mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	osd: update the default window switcher layout
The default window switcher layout is updated from:
  <windowSwitcher>
    <fields>
      <field content="type" width="25%" />
      <field content="trimmed_identifier" width="25%" />
      <field content="title" width="50%" />
    </fields>
  </windowSwitcher>
to:
  <windowSwitcher>
    <fields>
      <field content="icon" width="5%" />
      <field content="desktop_entry_name" width="30%" />
      <field content="title" width="65%" />
    </fields>
  </windowSwitcher>
Only desktop entry name and title are shown when libsfdo is not linked.
			
			
This commit is contained in:
		
							parent
							
								
									fdc8537eee
								
							
						
					
					
						commit
						44146487b2
					
				
					 3 changed files with 34 additions and 30 deletions
				
			
		| 
						 | 
				
			
			@ -1673,22 +1673,25 @@ deduplicate_key_bindings(void)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static struct {
 | 
			
		||||
	enum window_switcher_field_content content;
 | 
			
		||||
	int width;
 | 
			
		||||
} fields[] = {
 | 
			
		||||
	{ LAB_FIELD_TYPE, 25 },
 | 
			
		||||
	{ LAB_FIELD_TRIMMED_IDENTIFIER, 25 },
 | 
			
		||||
	{ LAB_FIELD_TITLE, 50 },
 | 
			
		||||
	{ LAB_FIELD_NONE, 0 },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
load_default_window_switcher_fields(void)
 | 
			
		||||
{
 | 
			
		||||
	struct window_switcher_field *field;
 | 
			
		||||
	static const struct {
 | 
			
		||||
		enum window_switcher_field_content content;
 | 
			
		||||
		int width;
 | 
			
		||||
	} fields[] = {
 | 
			
		||||
#if HAVE_LIBSFDO
 | 
			
		||||
		{ LAB_FIELD_ICON, 5 },
 | 
			
		||||
		{ LAB_FIELD_DESKTOP_ENTRY_NAME, 30 },
 | 
			
		||||
		{ LAB_FIELD_TITLE, 65 },
 | 
			
		||||
#else
 | 
			
		||||
		{ LAB_FIELD_DESKTOP_ENTRY_NAME, 30 },
 | 
			
		||||
		{ LAB_FIELD_TITLE, 70 },
 | 
			
		||||
#endif
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	for (int i = 0; fields[i].content != LAB_FIELD_NONE; i++) {
 | 
			
		||||
	struct window_switcher_field *field;
 | 
			
		||||
	for (size_t i = 0; i < ARRAY_SIZE(fields); i++) {
 | 
			
		||||
		field = znew(*field);
 | 
			
		||||
		field->content = fields[i].content;
 | 
			
		||||
		field->width = fields[i].width;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue