Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace incognito marker svg file #3188

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Aug 15, 2019

Fix brave/brave-browser#5368

This should be merged together with brave/brave-browser#5671

Screen Shot 2020-01-23 at 11 23 10 AM

Screen Shot 2020-01-23 at 11 23 30 AM

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@simonhong simonhong added this to the 0.71.x - Nightly milestone Aug 15, 2019
@simonhong simonhong self-assigned this Aug 15, 2019
@rossmoody
Copy link
Contributor

rossmoody commented Aug 15, 2019

Cleaned up the SVG code a bit and removed the id attr. This one is worth a shot:

<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg">
  <g fill="none" fill-rule="evenodd">
    <path d="M8 0C3.578 0 0 3.578 0 8c0 4.422 3.578 8 8 8 4.422 0 8-3.578 8-8 0-4.422-3.578-8-8-8z" fill="#5F6368" fill-rule="nonzero"/>
    <path d="M2.212 7.54c.092.299.276 2.029.827 2.528.568.514 2.713.506 3.123.283.92-.498 1.292-2.107 1.454-2.812C7.708 7.14 8 7.14 8 7.14s.308 0 .4.4c.163.704.519 2.318 1.437 2.815.41.223 2.555.231 3.125-.282.55-.5.734-2.235.826-2.534.091-.299.551-.598.643-.698.092-.1.092-.498 0-.598-.184-.2-2.352-.377-4.686-.1-.466.055-.643.2-1.746.2-1.102 0-1.28-.145-1.745-.2-2.333-.277-4.501-.1-4.685.1-.092.1-.092.499 0 .599.092.1.551.399.643.698z" fill="#FFFFFF" fill-rule="nonzero"/>
  </g>
</svg>

@simonhong
Copy link
Member Author

hmm, still got same result with latest one...

@bsclifton bsclifton removed this from the 0.71.x - Dev milestone Sep 12, 2019
@bsclifton
Copy link
Member

Removing milestone as this is not reviewed/approved/merged 👍

@simonhong
Copy link
Member Author

I think I found why this new svg doesn't work.
this svg file is used as a mask image not for background image.
So, only circle is drawn captured at description.

@rebron, I think proper mask svg image is needed to show like below.
image who can help this?

@rebron
Copy link
Collaborator

rebron commented Jan 10, 2020

@karenkliu @bradleyrichter Need some help here with the right svg image. We're getting a circle it looks like and not the whole icon.

@karenkliu
Copy link

@simonhong Is the circle part of the icon or do you only need the sunglasses part?

@simonhong
Copy link
Member Author

simonhong commented Jan 11, 2020

@karenkliu I need both (circle part and sunglass)
Below is the css code where our mask svg file will be used.

I think I have to say some background why new file is needed.
If I use current file in this PR with background-image, it will work well.
However, below code is chromium's original code and svg is used as a marker.
and I'm trying to replace it w/o upstream code change (we also do a huge effort for it :) )
So, I asked new marker svg file.
If you want to show only sunglass w/o circle, current svg file work (by deleting circle path)
If not, I think I need new marker svg file.

  #incognito {
    -webkit-mask-image: url(images/incognito_marker.svg);
    background-color: var(--cr-secondary-text-color);
    bottom: 20px;
    height: 16px;
    position: absolute;
    right: 16px;
    width: 16px;
  }

@karenkliu
Copy link

@simonhong Okay, not sure exactly what you needed but here is the sunglasses SVG both with and without the circle background. I have minimized the SVG file and removed all masks; hopefully it will work now.
sunglasses.zip

@simonhong simonhong added this to the 1.5.x - Nightly milestone Jan 23, 2020
@simonhong simonhong marked this pull request as ready for review January 23, 2020 02:27
@simonhong simonhong force-pushed the incognito_marker_in_downloads_page branch from 21a07e3 to 7589ff5 Compare January 23, 2020 02:27
@simonhong simonhong added CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-linux labels Jan 23, 2020
@simonhong
Copy link
Member Author

CI all passed :)

@simonhong simonhong removed CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-linux labels Jan 23, 2020
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! ++

@bsclifton bsclifton merged commit 2bcfee7 into master Jan 23, 2020
@bsclifton bsclifton deleted the incognito_marker_in_downloads_page branch January 23, 2020 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chromium incognito icons used in Private and Tor window for downloads
5 participants