Commit d1ff5433 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Remove code that moves Mac infobar subviews by 1 DIP.

I can't figure out what the justification for this is.  Mac infobars are not 2
DIP different in size than views infobars.

BUG=none
TEST=none

Change-Id: Ib54e240c9bc529f3793714012c7317524b0aea71
Reviewed-on: https://chromium-review.googlesource.com/996899Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549277}
parent 1a05021f
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<button verticalHuggingPriority="750" id="22"> <button verticalHuggingPriority="750" id="22">
<rect key="frame" x="350" y="5" width="96" height="25"/> <rect key="frame" x="350" y="7" width="96" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="roundTextured" title="OKBtn" bezelStyle="texturedRounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="23"> <buttonCell key="cell" type="roundTextured" title="OKBtn" bezelStyle="texturedRounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="23">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</connections> </connections>
</button> </button>
<button verticalHuggingPriority="750" id="20"> <button verticalHuggingPriority="750" id="20">
<rect key="frame" x="246" y="5" width="96" height="25"/> <rect key="frame" x="246" y="7" width="96" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="roundTextured" title="CancelBtn" bezelStyle="texturedRounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="21"> <buttonCell key="cell" type="roundTextured" title="CancelBtn" bezelStyle="texturedRounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="21">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</connections> </connections>
</button> </button>
<button id="15"> <button id="15">
<rect key="frame" x="454" y="10" width="16" height="16"/> <rect key="frame" x="454" y="12" width="16" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" imagePosition="overlaps" alignment="center" inset="2" id="16" customClass="ImageButtonCell"> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" imagePosition="overlaps" alignment="center" inset="2" id="16" customClass="ImageButtonCell">
<behavior key="behavior" lightByContents="YES"/> <behavior key="behavior" lightByContents="YES"/>
...@@ -61,12 +61,12 @@ ...@@ -61,12 +61,12 @@
</connections> </connections>
</button> </button>
<imageView id="4"> <imageView id="4">
<rect key="frame" x="5" y="2" width="32" height="32"/> <rect key="frame" x="5" y="4" width="32" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" id="5"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" id="5"/>
</imageView> </imageView>
<textField verticalHuggingPriority="750" id="2"> <textField verticalHuggingPriority="750" id="2">
<rect key="frame" x="38" y="10" width="208" height="17"/> <rect key="frame" x="38" y="12" width="208" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="InfoBar text" id="3"> <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="InfoBar text" id="3">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
......
...@@ -71,20 +71,12 @@ ...@@ -71,20 +71,12 @@
[self addAdditionalControls]; [self addAdditionalControls];
// Infobars are drawn a little taller, so have to move its controls to keep
// them centered.
// TODO(ellyjones): Remove this constant.
CGFloat heightDelta = 2;
for (NSView* nextSubview in [infoBarView_ subviews]) {
NSRect frame = [nextSubview frame];
frame.origin.y += heightDelta / 2;
[nextSubview setFrame:frame];
}
[infoBarView_ setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [infoBarView_ setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
cocoa_l10n_util::FlipAllSubviewsIfNecessary( cocoa_l10n_util::FlipAllSubviewsIfNecessary(
base::mac::ObjCCast<NSView>(infoBarView_)); base::mac::ObjCCast<NSView>(infoBarView_));
// TODO(ellyjones): InfoBar height should be computed from child heights +
// appropriate (Harmony) margins, and children repositioned accordingly.
constexpr int kDefaultBarTargetHeight = 40; constexpr int kDefaultBarTargetHeight = 40;
infobar_->SetTargetHeight(kDefaultBarTargetHeight); infobar_->SetTargetHeight(kDefaultBarTargetHeight);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment