diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 0d2ee62f..3db34dc4 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -10629,24 +10629,42 @@ list-style-image: url("../icons/broom.svg"); } /*= sidebarMenu-popup ========================================================*/ - #identity-popup-more-info { + #identity-popup-more-info.subviewbutton { list-style-image: url("chrome://global/skin/icons/info.svg"); } - #sidebar-switcher-bookmarks { + #identity-popup-more-info:is(menuitem) { + --menuitem-image: url("chrome://global/skin/icons/info.svg"); + } + #sidebar-switcher-bookmarks.subviewbutton { list-style-image: url("chrome://browser/skin/bookmark.svg"); } - #sidebar-switcher-history { + #sidebar-switcher-bookmarks:is(menuitem) { + --menuitem-image: url("chrome://browser/skin/bookmark.svg"); + } + #sidebar-switcher-history.subviewbutton { list-style-image: url("chrome://browser/skin/history.svg"); } - #sidebar-switcher-tabs { + #sidebar-switcher-history:is(menuitem) { + --menuitem-image: url("chrome://browser/skin/history.svg"); + } + #sidebar-switcher-tabs.subviewbutton { list-style-image: url("../icons/synced-tabs.svg"); } - #sidebar-reverse-position { + #sidebar-switcher-tabs:is(menuitem) { + --menuitem-image: url("../icons/synced-tabs.svg"); + } + #sidebar-reverse-position.subviewbutton { list-style-image: var(--uc-sidebar-icon-reverse); } - #sidebarMenu-popup > .subviewbutton[data-l10n-id="sidebar-menu-close"] { + #sidebar-reverse-position:is(menuitem) { + --menuitem-image: var(--uc-sidebar-icon-reverse); + } + #sidebarMenu-popup > *.subviewbutton[data-l10n-id="sidebar-menu-close"] { list-style-image: url("chrome://global/skin/icons/close.svg"); } + #sidebarMenu-popup > *:is(menuitem)[data-l10n-id="sidebar-menu-close"] { + --menuitem-image: url("chrome://global/skin/icons/close.svg"); + } /*= unified-extensions-view ===================================================*/ #unified-extensions-manage-extensions { list-style-image: url("chrome://mozapps/skin/extensions/extension.svg"); @@ -10693,6 +10711,7 @@ .openintabs-menuitem, #blockedPopupDontShowMessage, #BMB_viewBookmarksToolbar, + #sidebarMenu-popup, #context_openANewTab.tabmix-newtab-menu-icon { /* Color */ -moz-context-properties: fill, fill-opacity, stroke !important; @@ -10750,10 +10769,21 @@ .openintabs-menuitem, #blockedPopupDontShowMessage, #BMB_viewBookmarksToolbar, + #sidebarMenu-popup, #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; } + #sidebarMenu-popup:has(menuitem) { + margin-inline-start: calc( + (var(--context-menu-background-padding) + var(--panel-shadow-margin, 4px)) * -1 + ) !important; + } + :not(menu, #ContentSelectDropdown, #context-navigation) + > #sidebarMenu-popup:has(menuitem) + > menuitem:not(.menuitem-iconic, .bookmark-item, .in-menulist, [checked="true"]) { + padding-inline-start: 28px !important; + } /* Menubar */ @supports -moz-bool-pref("userChrome.icon.global_menubar") { #main-menubar > menu { @@ -10905,6 +10935,7 @@ .openintabs-menuitem, #blockedPopupDontShowMessage, #BMB_viewBookmarksToolbar, + #sidebarMenu-popup, #context_openANewTab.tabmix-newtab-menu-icon { background-position: left var(--context-menu-background-padding) center !important; padding-inline-start: 0 !important; @@ -10930,6 +10961,7 @@ .openintabs-menuitem, #blockedPopupDontShowMessage, #BMB_viewBookmarksToolbar, + #sidebarMenu-popup, #context_openANewTab.tabmix-newtab-menu-icon { padding-inline-start: var(--menu-background-padding-default) !important; margin-left: 0 !important; diff --git a/src/icons/_panel.scss b/src/icons/_panel.scss index 007de7d0..ce8e55ea 100644 --- a/src/icons/_panel.scss +++ b/src/icons/_panel.scss @@ -469,28 +469,40 @@ panelMenuBookmarkThisPage[starred] { } /*= sidebarMenu-popup ========================================================*/ +@mixin _subviewMenuitem($icon, $selector: null) { + &.subviewbutton#{$selector} { + list-style-image: $icon; + } + &:is(menuitem)#{$selector} { + --menuitem-image: #{$icon}; + } +} + #identity-popup-more-info { - list-style-image: url("chrome://global/skin/icons/info.svg"); + @include _subviewMenuitem(url("chrome://global/skin/icons/info.svg")); } #sidebar-switcher-bookmarks { - list-style-image: url("chrome://browser/skin/bookmark.svg"); + @include _subviewMenuitem(url("chrome://browser/skin/bookmark.svg")); } #sidebar-switcher-history { - list-style-image: url("chrome://browser/skin/history.svg"); + @include _subviewMenuitem(url("chrome://browser/skin/history.svg")); } #sidebar-switcher-tabs { - list-style-image: url("../icons/synced-tabs.svg"); + @include _subviewMenuitem(url("../icons/synced-tabs.svg")); } #sidebar-reverse-position { - list-style-image: var(--uc-sidebar-icon-reverse); + @include _subviewMenuitem(var(--uc-sidebar-icon-reverse)); } -#sidebarMenu-popup > .subviewbutton[data-l10n-id="sidebar-menu-close"] { - list-style-image: url("chrome://global/skin/icons/close.svg"); +#sidebarMenu-popup > * { + @include _subviewMenuitem( + url("chrome://global/skin/icons/close.svg"), + "[data-l10n-id=\"sidebar-menu-close\"]" + ); } /*= unified-extensions-view ===================================================*/ diff --git a/src/icons/layout/_menu.scss b/src/icons/layout/_menu.scss index 2a390ae8..c4c8276a 100644 --- a/src/icons/layout/_menu.scss +++ b/src/icons/layout/_menu.scss @@ -57,6 +57,12 @@ $_layoutCommonMenus: ( @include _layoutInitPaddingMenus { @include _layout_init_padding; } +#sidebarMenu-popup:has(menuitem) { + @include _layout_init_margin; + :not(menu, #ContentSelectDropdown, #context-navigation) > & > #{$_iconMenuitem} { + padding-inline-start: 28px !important; + } +} /* Menubar */ @include Option("userChrome.icon.global_menubar") { diff --git a/src/icons/layout/_menu_common.scss b/src/icons/layout/_menu_common.scss index 661481d6..f6a7a9b1 100644 --- a/src/icons/layout/_menu_common.scss +++ b/src/icons/layout/_menu_common.scss @@ -31,7 +31,7 @@ $_libraryMenuitem: "menupopup:is(#organizeButtonPopup, #maintenanceButtonPopup) $_libraryMenu: "menupopup:is(#viewMenuPopup, #maintenanceButtonPopup) > #{$_iconMenu}"; $_sendTabMenuPopup: "#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup"; $_otherPopupMenuitem: "menupopup:is(#{$_sendTabMenuPopup}, #frame > menupopup) > menuitem"; -$_otherIconMenu: ".openintabs-menuitem, #blockedPopupDontShowMessage, #BMB_viewBookmarksToolbar"; +$_otherIconMenu: ".openintabs-menuitem, #blockedPopupDontShowMessage, #BMB_viewBookmarksToolbar, #sidebarMenu-popup"; //-- Mixin --------------------------------------------------------------------- // Init Menu @@ -79,6 +79,10 @@ $_initialMenus: $_initialMenus + "," + background-position: var(--uc-menu-background-position) var(--context-menu-background-padding) center !important; padding-inline-start: var(--context-menu-background-padding) !important; } +@mixin _layout_init_margin() { + // Fix sidebar position + margin-inline-start: calc((var(--context-menu-background-padding) + var(--panel-shadow-margin, 4px)) * -1) !important +} @mixin _layout_win_native_menu_popup() { @include NativeMenuPopup {