diff options
author | ritsuka <[email protected]> | 2014-08-19 18:06:09 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-19 18:06:09 +0000 |
commit | da33f7120c66115d506be98d6cfb08bd2c267ea5 (patch) | |
tree | aad7cab4f7204693244e643b4fa89da6609ce619 /macosx | |
parent | f971f1e5fe433005027eb485c953bc8cf410885b (diff) |
MacGui: made the width and height textfield editable in the picture settings window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6323 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/English.lproj/PictureSettings.xib | 43 | ||||
-rw-r--r-- | macosx/PictureController.m | 24 |
2 files changed, 44 insertions, 23 deletions
diff --git a/macosx/English.lproj/PictureSettings.xib b/macosx/English.lproj/PictureSettings.xib index 70313f093..acd5d55ce 100644 --- a/macosx/English.lproj/PictureSettings.xib +++ b/macosx/English.lproj/PictureSettings.xib @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13F14" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> - <deployment version="1060" defaultVersion="1090" identifier="macosx"/> + <deployment version="1060" defaultVersion="1060" identifier="macosx"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/> </dependencies> <objects> @@ -46,7 +46,6 @@ <outlet property="fPictureCropBox" destination="7" id="242"/> <outlet property="fPictureSizeBox" destination="436" id="437"/> <outlet property="fRatioCheck" destination="45" id="74"/> - <outlet property="fRatioLabel" destination="244" id="522"/> <outlet property="fSizeFilterView" destination="281" id="419"/> <outlet property="fSizeInfoField" destination="278" id="280"/> <outlet property="fWidthField" destination="42" id="68"/> @@ -66,7 +65,7 @@ <autoresizingMask key="autoresizingMask"/> <userGuides> <userLayoutGuide affinity="minY"/> - <userLayoutGuide location="101" affinity="minX"/> + <userLayoutGuide location="191" affinity="minX"/> </userGuides> <subviews> <textField verticalHuggingPriority="750" id="262"> @@ -94,11 +93,11 @@ <tabViewItems> <tabViewItem label="Size" identifier="1" id="282"> <view key="view" id="285"> - <rect key="frame" x="10" y="19" width="638" height="184"/> + <rect key="frame" x="10" y="28" width="638" height="175"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <box title="Box" borderType="none" titlePosition="noTitle" id="436"> - <rect key="frame" x="14" y="49" width="358" height="126"/> + <rect key="frame" x="14" y="40" width="358" height="126"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <view key="contentView"> <rect key="frame" x="0.0" y="0.0" width="358" height="126"/> @@ -198,11 +197,17 @@ <textField verticalHuggingPriority="750" id="42"> <rect key="frame" x="76" y="107" width="62" height="16"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="167"> + <textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="167"> + <numberFormatter key="formatter" formatterBehavior="custom10_4" localizesFormat="NO" numberStyle="decimal" usesGroupingSeparator="NO" minimumIntegerDigits="1" maximumIntegerDigits="309" maximumFractionDigits="3" id="le0-iC-NhW"> + <real key="minimum" value="64"/> + </numberFormatter> <font key="font" metaFont="miniSystem"/> <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> + <connections> + <action selector="settingsChanged:" target="-2" id="EJC-vL-fSK"/> + </connections> </textField> <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="46"> <rect key="frame" x="143" y="78" width="15" height="22"/> @@ -271,16 +276,25 @@ <textField verticalHuggingPriority="750" id="43"> <rect key="frame" x="76" y="81" width="62" height="16"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="168"> + <textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="168"> + <numberFormatter key="formatter" formatterBehavior="custom10_4" localizesFormat="NO" numberStyle="decimal" usesGroupingSeparator="NO" minimumIntegerDigits="1" maximumIntegerDigits="309" maximumFractionDigits="3" id="9iU-HJ-b4u"> + <real key="minimum" value="64"/> + <metadata> + <real key="inspectorSampleValue" value="1.234"/> + </metadata> + </numberFormatter> <font key="font" metaFont="miniSystem"/> <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> + <connections> + <action selector="settingsChanged:" target="-2" id="hfw-v1-XQB"/> + </connections> </textField> <button id="45"> - <rect key="frame" x="73" y="57" width="18" height="18"/> + <rect key="frame" x="73" y="57" width="125" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <buttonCell key="cell" type="check" title="Keep aspect ratio:" bezelStyle="regularSquare" imagePosition="right" alignment="right" controlSize="small" inset="2" id="170"> + <buttonCell key="cell" type="check" title="Keep Aspect Ratio" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="170" customClass="HBHUDButtonCell"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="smallSystem"/> </buttonCell> @@ -288,22 +302,13 @@ <action selector="settingsChanged:" target="-2" id="urF-IM-OfA"/> </connections> </button> - <textField verticalHuggingPriority="750" id="244"> - <rect key="frame" x="89" y="59" width="131" height="14"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Keep Aspect Ratio" id="245"> - <font key="font" metaFont="smallSystem"/> - <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> </subviews> </view> <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/> <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </box> <box borderType="none" titlePosition="noTitle" id="7"> - <rect key="frame" x="374" y="49" width="254" height="126"/> + <rect key="frame" x="374" y="40" width="254" height="126"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <view key="contentView"> <rect key="frame" x="0.0" y="0.0" width="254" height="126"/> diff --git a/macosx/PictureController.m b/macosx/PictureController.m index 901bb5fe2..fcf8af530 100644 --- a/macosx/PictureController.m +++ b/macosx/PictureController.m @@ -204,11 +204,15 @@ static void *HBPictureControllerContext = &HBPictureControllerContext; { [fWidthStepper setEnabled: NO]; [fHeightStepper setEnabled: NO]; + [fWidthField setEditable:NO]; + [fHeightField setEditable:NO]; } else { [fWidthStepper setEnabled: YES]; [fHeightStepper setEnabled: YES]; + [fWidthField setEditable:YES]; + [fHeightField setEditable:YES]; } if (job->anamorphic.mode == HB_ANAMORPHIC_STRICT || job->anamorphic.mode == HB_ANAMORPHIC_LOOSE) @@ -596,6 +600,8 @@ static void *HBPictureControllerContext = &HBPictureControllerContext; [fModulusPopUp setHidden: YES]; [fWidthStepper setEnabled: NO]; [fHeightStepper setEnabled: NO]; + [fWidthField setEditable:NO]; + [fHeightField setEditable:NO]; } else { @@ -603,6 +609,8 @@ static void *HBPictureControllerContext = &HBPictureControllerContext; [fModulusPopUp setHidden: NO]; [fWidthStepper setEnabled: YES]; [fHeightStepper setEnabled: YES]; + [fWidthField setEditable:YES]; + [fHeightField setEditable:YES]; } if (job->anamorphic.mode == HB_ANAMORPHIC_STRICT || job->anamorphic.mode == HB_ANAMORPHIC_LOOSE) @@ -633,16 +641,24 @@ static void *HBPictureControllerContext = &HBPictureControllerContext; [fDisplayWidthField setEnabled: !job->anamorphic.keep_display_aspect]; } - if (sender == fHeightStepper) + if (sender == fHeightStepper || sender == fHeightField) { keep |= HB_KEEP_HEIGHT; - job->height = [fHeightStepper intValue]; + + if (sender == fHeightStepper) + job->height = [fHeightStepper intValue]; + else + job->height = [fHeightField intValue]; } - if (sender == fWidthStepper) + if (sender == fWidthStepper || sender == fWidthField) { keep |= HB_KEEP_WIDTH; - job->width = [fWidthStepper intValue]; + + if (sender == fWidthStepper) + job->width = [fWidthStepper intValue]; + else + job->width = [fWidthField intValue]; } if (sender == fParWidthField || sender == fParHeightField) |