H_BUTTON = 20;
W_BUTTON = 22;

W_COLUMN = 160;

W_LABELS_LEFT=max(
	zstring_width(zstring: '$$$/Dialogs/Generic/Color'),
	zstring_width(zstring: '$$$/Dialogs/Generic/Opacity'));

W_LABELS_RIGHT=zstring_width(zstring: '$$$/Panels/Markup/UnderlineStyle');

W_STYLE_POPUPWIDTH = max(
	zstring_width(zstring: '$$$IDS_SQUIGGLY_UINAME'),
	zstring_width(zstring: '$$$IDS_STRAIGHT_UINAME'))+max_char_width();

dialog()
{
	view(align_children: align_left)
	{
		view(align_children: align_row)
		{
			view(align_children: align_row, width: W_COLUMN)
			{
				view(align_children: align_right, width: W_LABELS_LEFT)
				{
					static_text(item_id: 'txt1', name: '$$$/Dialogs/Generic/Color');
				}
				view(align_children: align_left)
				{
					button(item_id: 'sclr', picture: true, height: H_BUTTON, width: W_BUTTON);
				}
			}
			view(align_children: align_row, width: W_COLUMN)
			{
				view(align_children: align_right, width: W_LABELS_RIGHT)
				{
					static_text(item_id: 'stll', name: '$$$/Panels/Markup/UnderlineStyle');
				}
				view(align_children: align_left)
				{
					popup(item_id: 'styl', width: W_STYLE_POPUPWIDTH);
				}
			}
		}

		view(align_children: align_row)
		{
			view(align_children: align_row, width: 2 * W_COLUMN)
			{
				view(align_children: align_right, width: W_LABELS_LEFT)
				{
					static_text(item_id: 'txt2', name: '$$$/Dialogs/Generic/Opacity');
					gap(height: gStaticTextHeight);
				}
				view(align_children: align_left)
				{
					edit_text(item_id: 'opac', width: 4 * max_char_width(), height: gEditTextHeight);
					slider(item_id: 'opas', width: 101, height: 9);
				}
			}
		}
		gap(height: 3 * gEditTextHeight);
	}
}
