Skip to content

Commit

Permalink
Fix: Icons - Tab Mix Plus's newtab icon
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Nov 3, 2022
1 parent aff13a5 commit 9e81bad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -9399,7 +9399,8 @@
> menuitem,
.openintabs-menuitem,
#blockedPopupDontShowMessage,
#BMB_viewBookmarksToolbar {
#BMB_viewBookmarksToolbar,
#context_openANewTab.tabmix-newtab-menu-icon {
/* Color */
-moz-context-properties: fill, fill-opacity !important;
fill: currentColor !important;
Expand Down Expand Up @@ -9453,7 +9454,8 @@
> menuitem,
.openintabs-menuitem,
#blockedPopupDontShowMessage,
#BMB_viewBookmarksToolbar {
#BMB_viewBookmarksToolbar,
#context_openANewTab.tabmix-newtab-menu-icon {
background-position: var(--uc-menu-background-position) var(--context-menu-background-padding) center !important;
padding-inline-start: var(--context-menu-background-padding) !important;
}
Expand Down Expand Up @@ -9512,7 +9514,8 @@
> menuitem,
.openintabs-menuitem,
#blockedPopupDontShowMessage,
#BMB_viewBookmarksToolbar {
#BMB_viewBookmarksToolbar,
#context_openANewTab.tabmix-newtab-menu-icon {
background-position: left var(--context-menu-background-padding) center !important;
padding-inline-start: 0 !important;
}
Expand Down Expand Up @@ -9544,7 +9547,8 @@
> menuitem,
.openintabs-menuitem,
#blockedPopupDontShowMessage,
#BMB_viewBookmarksToolbar {
#BMB_viewBookmarksToolbar,
#context_openANewTab.tabmix-newtab-menu-icon {
padding-inline-start: var(--menu-background-padding-default) !important;
margin-left: 0 !important;
}
Expand Down
3 changes: 2 additions & 1 deletion src/icons/layout/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ $_layoutCommonMenus: (
$_libraryMenuitem,
$_libraryMenu,
$_sendTabMenuitem,
$_otherIconMenu
$_otherIconMenu,
"#context_openANewTab.tabmix-newtab-menu-icon"
);
@mixin _layoutInitIconMenus() {
#{$_globalMenus},
Expand Down

5 comments on commit 9e81bad

@thunderstone135
Copy link

Choose a reason for hiding this comment

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

I think you should revert this change. I'm getting two icons when I implement this on my end.

Screenshot

@black7375
Copy link
Owner Author

Choose a reason for hiding this comment

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

@thunderstone135 Would you like to test it with the latest commit?

@thunderstone135
Copy link

@thunderstone135 thunderstone135 commented on 9e81bad Nov 6, 2022

Choose a reason for hiding this comment

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

@black7375 I no longer see two icons, but there's an extra space of 24px.

I was able to resolve this issue by removing 👇

    @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) {
      :root {
        --context-menu-background-padding: 1em;
        --context-menu-text-padding: 24px;
        /* 16px + 8px */
        --menu-background-padding-default: calc(
          var(--context-menu-background-padding) + var(--context-menu-text-padding)
        );
      }
      :not(menu, #ContentSelectDropdown, #context-navigation)
        > menupopup
        > menuitem:not(.menuitem-iconic, .bookmark-item, .in-menulist, [checked="true"]),
      :not(menu, #ContentSelectDropdown, #context-navigation)
        > menupopup
        > menu:not(.menu-iconic, .in-menulist, [checked="true"]),
      menupopup:is(#menu_FilePopup, #menu_EditPopup, #menu_viewPopup, #goPopup, #historyMenuPopup, #bookmarksMenuPopup, #menu_ToolsPopup, #windowPopup, #menu_HelpPopup)
        menuitem:not(.menuitem-iconic, .bookmark-item, .in-menulist, [checked="true"]),
      menupopup:is(#menu_FilePopup, #menu_EditPopup, #menu_viewPopup, #goPopup, #historyMenuPopup, #bookmarksMenuPopup, #menu_ToolsPopup, #windowPopup, #menu_HelpPopup)
        menu:not(.menu-iconic, .in-menulist, [checked="true"]),
      menupopup:is(#organizeButtonPopup, #maintenanceButtonPopup)
        > menuitem:not(.menuitem-iconic, .bookmark-item, .in-menulist, [checked="true"]),
      menupopup:is(#viewMenuPopup, #maintenanceButtonPopup) > menu:not(.menu-iconic, .in-menulist, [checked="true"]),
      menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup)
        > menuitem,
      .openintabs-menuitem,
      #blockedPopupDontShowMessage,
      #BMB_viewBookmarksToolbar,
-     #context_openANewTab.tabmix-newtab-menu-icon {
        padding-inline-start: var(--menu-background-padding-default) !important;
        margin-left: 0px !important;
      }
    }

I suspect that it's due to --context-menu-text-padding: 24px; 🤔

@thunderstone135
Copy link

@thunderstone135 thunderstone135 commented on 9e81bad Nov 6, 2022

Choose a reason for hiding this comment

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

@black7375
I know you're planning on going webextension[1], but I hope you don't drop the userChrome part.
Otherwise, some of us may no longer be able to test the commits you make in advance.

Edit:
Well, I may be able to test the commits since I know how to reverse engineer webextensions as long as I'm familiar with the codes used (e.g., javascript, css, etc.), but I can't say the same for others.

@black7375
Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, debugging should not be difficult.
I tested it with a Windows machine & updated and there will be a release today.

Please sign in to comment.