Mini Kabibi Habibi
// Copyright 2023 Adobe Systems Incorporated
vAspectRatioPopupID = 2382;
vCropFillOptions = 2386;
font = static_small_font;
vARPopupWidth = min(zstring_asinteger(zstring: '$$$/override/CropOptions/AspectRatioPopupMaxWidth=500'),
max(zstring_width(zstring: '$$$/Menu/CropAspectRatio/Ratio=Ratio', font: static_small_font),
zstring_width(zstring: '$$$/Menu/CropAspectRatio/Original=Original Ratio', font: static_small_font),
zstring_width(zstring: '$$$/Menu/CropAspectRatio/1x1=1 : 1 (Square)', font: static_small_font),
zstring_width(zstring: '$$$/Menu/CropAspectRatio/4x5=4 : 5 (8 : 10)', font: static_small_font),
zstring_width(zstring: '$$$/Menu/CropAspectRatio/2x3=2 : 3 (4 : 6)', font: static_small_font)) + 25);
// Note - this is a special case, regular #defines such as Macintosh or WIN_32 are not available here
#ifdef MacEve
cropNumTemplate = '$$$/Dialog/CropOptions/CropNumberTemplate/Mac=0000000.000';
resNumTemplate = '$$$/Dialog/CropOptions/CropResNumberTemplate/Mac=00000.000';
#endif
#ifdef WinEve
cropNumTemplate = '$$$/Dialog/CropOptions/CropNumberTemplate/Win=00000000.000';
resNumTemplate = '$$$/Dialog/CropOptions/CropResNumberTemplate/Win=000000.000';
#endif
vEditWidth = zstring_width(zstring: cropNumTemplate, font_id: gUIFont, font_size: gSmallFontSize);
vResEditWidth = zstring_width(zstring: resNumTemplate, font_id: gUIFont, font_size: gSmallFontSize);
view(class_name: 'TCropOptions', view_id: 'panl', width: gOptionsPanelWidth, height: gOptionsPanelHeight, placement: place_row, spacing: gGap,
child_vertical: align_center, horizontal: align_fill, margin_width: gOptionsMarginWidth, debug_back_color: 'null') {
popup(resource_id: vAspectRatioPopupID, view_id: 'asrt', width: vARPopupWidth, usesCompressed: true,
tooltip: '$$$/CropOptions/ToolTips/AspectRatioPopup=Select a preset aspect ratio or crop size');
group(child_vertical: align_center, placement: place_row, spacing: gSmallGap) {
edit_text(view_id: 'cols', class_name: 'TUnitsFixedPoint', width: vEditWidth);
}
view(class_name: gIconButtonClass, spacing: 0, margin: 1, horizontal: align_right) {
group(spacing: 0, margin: 1, frame: gIconButtonOtherButtonFrame) {
icon_button(data_type: 'int32', width: 24, height: 25, view_id: 'aswp', sticky: false,
tooltip: '$$$/TextOptions/ToolTips/SwapAspect=Swaps height and width', initial_value: 0, icon_root_name: 'SwapValues');
}
}
group(child_vertical: align_center, placement: place_row, spacing: gSmallGap) {
edit_text(view_id: 'rows', class_name: 'TUnitsFixedPoint', width: vEditWidth);
}
group(horizontal: align_left, placement: place_row, child_vertical: align_center, view_id: 'resg', spacing: gSmallGap + 1) {
view(class_name: 'TNarrowGroupSeparator', width: 1, height: gOptionsPanelGroupBarHeight, vertical: align_center, horizontal: align_left);
cluster(view_id: 'resU', class_name: 'TImageResUnit', margin_height: 0, margin_width: 0, spacing: gSmallGap,
child_vertical: align_center, placement: place_row, tooltip: '$$$/PerspectiveCropOptions/Tooltip/Resolution=Set the resolution for cropped image') {
edit_text(view_id: 'res ', class_name: 'TFixedPoint', width: vResEditWidth);
popup(resource_id: 1027, view_id: 'pres', usesCompressed: true, tooltip: '$$$/Dialog/PerspectiveCropOptions/Resolution=Resolution:');
}
}
group(horizontal: align_left, placement: place_row, child_vertical: align_center, view_id: 'rorg') {
group(horizontal: align_left, placement: place_row, child_vertical: align_center, spacing: gSmallGap + 1, margin: 0) {
view(class_name: 'TNarrowGroupSeparator', width: 1, height: gOptionsPanelGroupBarHeight, vertical: align_center);
button(view_id: 'cler', name: '$$$/Dialog/PerspectiveCropOptions/Clear=Clear', dismiss: false);
}
group(placement: place_row, spacing: gSmallGap, margin: gClusterMargin, tooltip: '$$$/CropOptions/Tooltip/Straighten=Straighten the image by drawing a line on it') {
icon_button(view_id: 'levl', class_name: 'TPunchButton', data_type: 'int32', width: gToolOptionsIconWidth, height: gToolOptionsIconHeight,
initial_value: 0, spacing: 0, icon_root_name: 'CropLevel');
static_text(horizontal: align_right, view_id: 'lvll', name: '$$$/Dialog/CropOptions/Straighten=Straighten');
}
view(class_name: 'TNarrowGroupSeparator', width: 1, height: gOptionsPanelGroupBarHeight, vertical: align_center);
icon_button(class_name: 'TPunchButton', width: gToolOptionsIconWidth, height: gToolOptionsIconHeight, view_id: 'ovly',
tooltip: '$$$/CropOptions/ToolTips/OverlayPopup=Set the overlay options for the Crop Tool', initial_value: 0, icon_root_name: 'CropOverlayThirds');
view(view_id: 'optf', vertical: align_center, class_name: 'TFlyoutIconButton', placement: place_row, spacing: gSmallGap,
tooltip: '$$$/CropOptions/ToolTips/SettingsFlyout=Set additional Crop options') {
view(class_name: 'TCustomDrawFlyoutControl', view_id: 'gfly', width: gToolOptionsIconWidth, height: gToolOptionsIconHeight, vertical: align_center);
}
view(class_name: 'TNarrowGroupSeparator', width: 1, height: gOptionsPanelGroupBarHeight, vertical: align_center);
check_box(view_id: 'hddl', class_name: 'TMiniCheckBox', alternate_icon: 'DeleteCroppedPixels',
name: '$$$/Dialog/CropOptions/HideDelete=Delete Cropped Pixels',
tooltip: '$$$/CropOptions/ToolTips/HideDelete=Determines if pixel data outside the crop box is retained or deleted');
// crop-fill options popup
popup(resource_id: vCropFillOptions, view_id: 'CFop', vertical: align_center, margin: 0,
width: zstring_width ( zstring : '$$$/CropOptions/FillMethodPopupTransparent=Transparent (default)' ) + 12,
tooltip: '$$$/CropOptions/ToolTips/CropAutoFillOptions=How expanded crop area gets filled');
view(class_name: gIconButtonClass, spacing: 0, margin: 0, horizontal: align_left, vertical: align_center) {
icon_button(data_type: 'int32', width: 22, height: 22, view_id: 'FInf', sticky: false,
tooltip: '$$$/CropOptions/ToolTips/FillMethodInfo=Displays pop-up help for the fill methods', initial_value: 0, icon_root_name: 'SmallNote');
}
}
group(horizontal: align_left, placement: place_row, spacing: 5, child_vertical: align_center, margin: 0) {
icon_button(data_type: 'int32', width: gToolOptionsIconWidth, height: gToolOptionsIconHeight, view_id: 'rset', sticky: false,
tooltip: '$$$/CropCommandOptions/ToolTip/Reset=Reset the crop box, image rotation, and aspect ratio settings', initial_value: 0, icon_root_name: 'PuppetReset');
group(horizontal: align_left, placement: place_row, spacing: 5, child_vertical: align_center, margin: 0, view_id: 'okcg') {
view(class_name: gIconButtonClass, spacing: 0, margin: 1) {
group(spacing: 0, margin: 1, frame: gIconButtonOtherButtonFrame, child_vertical: align_center) {
view(view_id: 'cncl', class_name: 'TBevelCancelButton', width: gToolOptionsIconWidth, height: gToolOptionsIconHeight,
tooltip: '$$$/CropCommandOptions/ToolTip/Cancel=Cancel current crop operation');
}
}
view(class_name: gIconButtonClass, spacing: 0, margin: 1) {
group(spacing: 0, margin: 1, frame: gIconButtonOtherButtonFrame, child_vertical: align_center, placement: place_row) {
view(view_id: 'acpt', class_name: 'TBevelOKButton', width: gToolOptionsIconWidth, height: gToolOptionsIconHeight,
tooltip: '$$$/CropCommandOptions/ToolTip/OK=Commit current crop operation');
}
}
}
}
}
// Footer - Copyright 2023 Adobe Systems Incorporated