Skip to content

Commit

Permalink
remove zoom button on hover, fix bar button treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
SabrinaTardio committed May 7, 2024
1 parent f1a026b commit d52c969
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ final class AddressBarButtonsViewController: NSViewController {
didSet {
if isMouseOverNavigationBar != oldValue {
updateBookmarkButtonVisibility()
updateZoomButtonVisibility()
}
}
}
Expand Down Expand Up @@ -320,7 +319,7 @@ final class AddressBarButtonsViewController: NSViewController {
&& !isTextFieldEditorFirstResponder
&& !isAnyTrackerAnimationPlaying
&& !isAnyShieldAnimationPlaying
&& (hasNonDefaultZoom || isMouseOverNavigationBar || zoomPopover?.isShown == true)
&& (hasNonDefaultZoom || zoomPopover?.isShown == true)

zoomButton.isHidden = !shouldShowZoom
}
Expand Down
10 changes: 9 additions & 1 deletion DuckDuckGo/NavigationBar/View/NavigationBar.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@
<constraint firstAttribute="height" constant="32" id="fQf-sl-KYI"/>
</constraints>
</customView>
<button id="b30-aJ-fvG" userLabel="ZoomButton">
<button id="b30-aJ-fvG" userLabel="ZoomButton" customClass="AddressBarButton" customModule="DuckDuckGo_Privacy_Browser" customModuleProvider="target">
<rect key="frame" x="84" y="1.5" width="24.5" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="plus.magnifyingglass" catalog="system" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="Rfs-eh-Yrh">
Expand All @@ -710,6 +710,14 @@
<constraint firstAttribute="height" constant="24" id="6TS-h0-8pK"/>
<constraint firstAttribute="width" constant="24" id="JvZ-46-TUe"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="mouseOverColor">
<color key="value" name="ButtonMouseOverColor"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="mouseDownColor">
<color key="value" name="ButtonMouseDownColor"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="zoomButtonAction:" target="mcr-nj-GmC" id="xCK-4c-baX"/>
</connections>
Expand Down

0 comments on commit d52c969

Please sign in to comment.