diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 18:41:26 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 18:41:26 +0000 |
commit | 7e935be36015fb5bd65da09a9ad1c0838d88cc08 (patch) | |
tree | 23295c6ead0bdc1ad8380114fbd53866c324a9cd | |
parent | 64c087db093a3c75a3c998823e4ad3143c0319fb (diff) | |
download | chromium_src-7e935be36015fb5bd65da09a9ad1c0838d88cc08.zip chromium_src-7e935be36015fb5bd65da09a9ad1c0838d88cc08.tar.gz chromium_src-7e935be36015fb5bd65da09a9ad1c0838d88cc08.tar.bz2 |
[Mac] Use the two side by side buttons in the Under the Hood prefs as another things to force the window wider.
Also put in replacement stub text in the sync status text field so it is always two lines at layout time, the code already set it to the correct state during initialization (prevents a DCHECK in some languages).
BUG=39391
TEST=see bug
Review URL: http://codereview.chromium.org/1535009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43244 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/nibs/Preferences.xib | 18 | ||||
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.mm | 22 |
2 files changed, 20 insertions, 20 deletions
diff --git a/chrome/app/nibs/Preferences.xib b/chrome/app/nibs/Preferences.xib index 7f154e0..994e2aa 100644 --- a/chrome/app/nibs/Preferences.xib +++ b/chrome/app/nibs/Preferences.xib @@ -2,15 +2,15 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">9L31a</string> - <string key="IBDocument.InterfaceBuilderVersion">677</string> + <string key="IBDocument.SystemVersion">9L30</string> + <string key="IBDocument.InterfaceBuilderVersion">680</string> <string key="IBDocument.AppKitVersion">949.54</string> <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="481"/> - <integer value="74"/> <integer value="482"/> + <integer value="74"/> + <integer value="481"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -595,7 +595,7 @@ <object class="NSButton" id="553918619"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{228, 558}, {150, 32}}</string> + <string key="NSFrame">{{279, 558}, {150, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="871001089"> @@ -615,7 +615,7 @@ <object class="NSButton" id="246942000"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{26, 558}, {202, 32}}</string> + <string key="NSFrame">{{26, 558}, {253, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="42833123"> @@ -1988,7 +1988,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextFieldCell" key="NSCell" id="123936632"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">272629760</int> - <string key="NSContents">^IDS_SYNC_NOT_SET_UP_INFO</string> + <string key="NSContents">Sync status: some default text that is two lines long to force the initial size calc to handle all possible values for this field.</string> <reference key="NSSupport" ref="783256529"/> <reference key="NSControlView" ref="90260648"/> <bool key="NSDrawsBackground">YES</bool> @@ -3701,13 +3701,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="928184762"/> <reference ref="287656702"/> <reference ref="246942000"/> - <reference ref="553918619"/> <reference ref="332489843"/> <reference ref="514356928"/> <reference ref="860741341"/> <reference ref="886068350"/> <reference ref="733677494"/> <reference ref="777041502"/> + <reference ref="553918619"/> </object> <reference key="parent" ref="956860932"/> <string key="objectName">Under the Hood Content</string> @@ -5188,7 +5188,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{972, 838}, {443, 643}}</string> + <string>{{972, 839}, {443, 643}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index 8524e26..d59d043 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -316,8 +316,6 @@ void RemoveGroupFromView(NSView* view, NSArray* toRemove) { // case "Content Settings" and "Clear browsing data" as they are horizontal as // well. CGFloat AutoSizeUnderTheHoodContent(NSView* view, - NSButton* contentSettingsButton, - NSButton* clearDataButton, NSPathControl* downloadLocationControl, NSButton* downloadLocationButton) { CGFloat verticalShift = 0.0; @@ -335,13 +333,6 @@ CGFloat AutoSizeUnderTheHoodContent(NSView* view, } verticalShift += delta.height; - // "Content Settings" and "Clear Browsing Data" are horizontally aligned. - if (view == contentSettingsButton) { - NSPoint origin = [clearDataButton frame].origin; - origin.x += delta.width; - [clearDataButton setFrameOrigin:origin]; - } - // The Download Location controls go in a row with the button aligned to the // right edge and the path control using all the rest of the space. if (view == downloadLocationButton) { @@ -662,8 +653,19 @@ void PersonalDataManagerObserver::ShowAutoFillDialog( [personalStuffGroupThemes_ objectAtIndex:kThemeResetButtonIndex], [personalStuffGroupThemes_ objectAtIndex:kThemeThemesButtonIndex]); + // Size the Privacy and Clear buttons that make a row in Under the Hood. + CGFloat privacyRowChange = SizeToFitButtonPair(contentSettingsButton_, + clearDataButton_); + // Under the Hood view is narrower (then the other panes) in the nib, subtract + // out the amount it was already going to grow to match the other panes when + // calculating how much the row needs things to grow. + privacyRowChange -= + ([underTheHoodScroller_ contentSize].width - + NSWidth([underTheHoodContentView_ frame])); + // Find the most any row changed in size. CGFloat maxWidthChange = std::max(defaultBrowserChange.width, themeRowChange); + maxWidthChange = std::max(maxWidthChange, privacyRowChange); // If any grew wider, make the views wider. If they all shrank, they fit the // existing view widths, so no change is needed//. @@ -760,8 +762,6 @@ void PersonalDataManagerObserver::ShowAutoFillDialog( // Now that Under the Hood is the right width, auto-size to the new width to // get the final height. verticalShift = AutoSizeUnderTheHoodContent(underTheHoodContentView_, - contentSettingsButton_, - clearDataButton_, downloadLocationControl_, downloadLocationButton_); [GTMUILocalizerAndLayoutTweaker |