gMaxWidth = max_char_width() * 4;
gVendWidth = zstring_width(zstring: '$$$/Dialogs/SearchFind/WebSearch');

gRangeResultLabelWidth =  max(
	zstring_width(zstring: '$$$/Dialogs/SearchFind/ShowTop'),
	zstring_width(zstring: '$$$/Dialogs/SearchFind/ProximityRange'));

dialog(name: '$$$/Dialogs/SearchFind/Preferences', target_id: 'SrchP', margin_height: 0, margin_width: 0)
{
	view(dheight: gPrefsPanelHeight, dwidth: gPrefsPanelWidth, align_children: align_left)
	{
		cluster(name: '$$$/Dialogs/SearchFind/Search', dwidth: gPrefsPanelWidth-40, align_children: align_left)
		{
			check_box(item_id: 'AtCp', name:'$$$/Dialogs/SearchFind/EnableSuggestions');
			check_box(item_id: 'HiAl', name:'$$$/Dialogs/SearchFind/EnableHighlightAll');
			check_box(item_id: 'IgFH', name:'$$$/Dialogs/SearchFind/IgnoreFH');
			check_box(item_id: 'IgDi', name:'$$$/Dialogs/SearchFind/IgnoreDiacritics');
			check_box(item_id: 'Advn', name:'$$$/Dialogs/SearchFind/AlwaysAdvanced');
			check_box(item_id: 'DiTi', name:'$$$/Dialogs/SearchFind/DisplayTitle');

			view(align_children: align_row)
			{
				static_text( name: '$$$/Dialogs/SearchFind/ShowTop', alignment: align_left, width: gRangeResultLabelWidth); 
				edit_text(item_id: 1126, width: gMaxWidth );
			}

			view(align_children: align_row)
			{
				static_text( item_id: 'PrST', name: '$$$/Dialogs/SearchFind/ProximityRange', alignment: align_left, width: gRangeResultLabelWidth); 
				edit_text(item_id: 1127, width: gMaxWidth );
			}
		}
	
		cluster(item_id: 'ffcl', name: '$$$/Dialogs/SearchFind/FastFind', dwidth: gPrefsPanelWidth-40, align_children: align_left)
		{
			static_text(item_id: 'Desc', alignment: align_fill, height: gStaticTextHeight*2);
			check_box(item_id: 'FFnd', name:'$$$/Dialogs/SearchFind/EnableFastFind');
	
			view(align_children: align_row)
			{
				gap();
				gap();
				gap();
				static_text( item_id: 'limc', name: '$$$/Dialogs/SearchFind/LimitChache', alignment: align_right); 
				edit_text(item_id: 'ChSz', width: gMaxWidth );
				static_text( item_id: 'mb  ', name: '$$$/Dialogs/SearchFind/MB' );
			}

			button(item_id: 'Purg', name: '$$$/Dialogs/SearchFind/PurgeCache');
		}


		cluster(item_id: 'ffc2', name: '$$$/Dialogs/SearchFind/WebSearch', dwidth: gPrefsPanelWidth-40, align_children: align_left)
		{
			view(align_children: align_row)
			{
				static_text(item_id: 'LgLb', name: '$$$/Dialogs/SearchFind/SearchVender');
				popup(item_id: 'Vend', width: gVendWidth);
			}

		}



	}
}
	