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

Icon display when the checkbox menu is false #375

Merged
merged 8 commits into from
Jun 5, 2022
138 changes: 82 additions & 56 deletions css/leptonChrome.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/leptonContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@

#show-other-bookmarks_PersonalToolbar {
/* checkbox */
/* --menuitem-image: url("../icons/star-line-horizontal.svg"); */
--menuitem-image: url("../icons/star-line-horizontal.svg");
}

#placesContext_showAllBookmarks {
Expand Down
3 changes: 3 additions & 0 deletions icons/drawer-arrow-download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/eye-tracking-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/fluid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/folder-globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/plug-disconnected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion src/icons/_global_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--menuitem-image: url("chrome://browser/skin/new-tab.svg");
}
#menu_newUserContext {
--menuitem-image: url("../icons/container-openin-16.svg");
}
#menu_newNavigator {
--menuitem-image: url("chrome://browser/skin/window.svg");
Expand Down Expand Up @@ -43,6 +44,8 @@
}

#goOfflineMenuitem {
/* checkbox */
--menuitem-image: url("../icons/plug-disconnected.svg");
}
#menu_FileQuitItem {
--menuitem-image: url("../icons/quit.svg");
Expand Down Expand Up @@ -109,12 +112,14 @@
}

#fullScreenItem {
/* checkbox */
--menuitem-image: url("chrome://browser/skin/fullscreen.svg");
}
#menu_readerModeItem {
--menuitem-image: url("chrome://browser/skin/reader-mode.svg");
}
#menu_showAllTabs {
--menuitem-image: url("../icons/tab.svg");
}

#documentDirection-swap {
Expand Down Expand Up @@ -152,6 +157,7 @@
--menuitem-image: url("../icons/restore-session.svg");
}
#hiddenTabsMenu {
--menuitem-image: url("../icons/eye-hide.svg")
}
#historyUndoMenu {
--menuitem-image: url("chrome://browser/skin/tab.svg");
Expand Down Expand Up @@ -209,7 +215,7 @@
}

#webDeveloperMenu, /* Legacy */
#browserToolsMenu {
#browserToolsMenu {
--menuitem-image: url("../icons/developer.svg");
}
#menu_pageInfo {
Expand All @@ -220,6 +226,8 @@
#enableDeveloperTools {
}
#menu_devToolbox {
/* checkbox */
--menuitem-image: url("../icons/developer.svg");
}
#menu_taskManager {
--menuitem-image: url("../icons/performance.svg");
Expand All @@ -237,8 +245,12 @@
--menuitem-image: url("chrome://devtools/skin/images/command-console.svg");
}
#menu_responsiveUI {
/* checkbox */
--menuitem-image: url("../icons/command-responsivemode.svg");
}
#menu_eyedropper {
/* checkbox */
--menuitem-image: url("chrome://devtools/skin/images/command-eyedropper.svg");
}
#menu_pageSource {
--menuitem-image: url("../icons/document-search.svg");
Expand Down
34 changes: 18 additions & 16 deletions src/icons/_layout_menu.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//-- Mixin ---------------------------------------------------------------------
// Items
$_iconNoneCommon: ".in-menulist, [type=\"checkbox\"], [checked=\"true\"]";
$_iconNoneCommon: ".in-menulist, [checked=\"true\"]";
$_iconMenuitem: "menuitem:not(.menuitem-iconic, .bookmark-item, #{$_iconNoneCommon})";
$_iconMenu: "menu:not(.menu-iconic, #{$_iconNoneCommon})";

Expand Down Expand Up @@ -57,8 +57,10 @@ $_layoutCommonMenus: (
}

//------------------------------------------------------------------------------
menupopup menuitem:not([type="checkbox"], [type="radio"]),
menupopup menu:not([type="checkbox"], [type="radio"]),
#{selector.append(
"menupopup menuitem, menupopup menu",
":not([type=\"checkbox\"][checked=\"true\"], [type=\"radio\"])"
)},
#{$_globalMenus} {
-moz-appearance: none !important; /* Linux: menulist */
}
Expand Down Expand Up @@ -113,18 +115,18 @@ menupopup menu:not([type="checkbox"], [type="radio"]),
}

/* Padding - Windows */
@include OS($win) {
/* Checkbox */
:root {
--context-menu-text-padding: calc(var(--menu-padding) + var(--context-menu-background-padding-default) + 16px);
}
:not(menu, #ContentSelectDropdown, #context-navigation)
> menupopup
> menuitem[type="checkbox"]:not([checked="true"])
> .menu-iconic-left {
padding-inline-start: var(--context-menu-text-padding);
}
}
// @include OS($win) {
// /* Checkbox */
// :root {
// --context-menu-text-padding: calc(var(--menu-padding) + var(--context-menu-background-padding-default) + 16px);
// }
// :not(menu, #ContentSelectDropdown, #context-navigation)
// > menupopup
// > menuitem[type="checkbox"]:not([checked="true"])
// > .menu-iconic-left {
// padding-inline-start: var(--context-menu-text-padding);
// }
// }

@include OS($win7) {
:root {
Expand Down Expand Up @@ -185,7 +187,7 @@ menupopup menu:not([type="checkbox"], [type="radio"]),
}

/* Checkbox menuitem, None iconic menu */
#{selector.nest($_nestedPopupPadding, "menuitem[type=\"checkbox\"], menu:not(.menu-iconic)")} {
#{selector.nest($_nestedPopupPadding, "menuitem[checked=\"true\"], menu:not(.menu-iconic)")} {
padding-inline-start: calc(var(--context-menu-background-padding) + var(--context-menu-mac-padding)) !important;
}

Expand Down
4 changes: 2 additions & 2 deletions src/icons/_panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ panelMenuBookmarkThisPage[starred] {
#PanelUI-developer-tools-view .subviewbutton:nth-child(4) {
list-style-image: url("../icons/window-dev-tools.svg");
}
/* Browser Content Toolbaox - */
/* Browser Content Toolbox */
#appmenu-developer-tools-view .subviewbutton:nth-child(5),
#PanelUI-developer-tools-view .subviewbutton:nth-child(5) {
list-style-image: url("../icons/command-frames.svg");
Expand Down Expand Up @@ -371,7 +371,7 @@ panelMenuBookmarkThisPage[starred] {
}

#allTabsMenu-hiddenTabsButton {
list-style-image: url("../icons/password-hide.svg");
list-style-image: url("../icons/eye-hide.svg")
}

#allTabsMenu-containerTabsView .subviewbutton:last-child {
Expand Down
9 changes: 5 additions & 4 deletions src/icons/context_menu/_content_area.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
}
#context-viewsource-wrapLongLines {
/* checkbox */
/* --menuitem-image: url("../icons/arrow-sort-down-lines.svg"); */
--menuitem-image: url("../icons/arrow-sort-down-lines.svg");
}

#context-viewsource-highlightSyntax {
/* checkbox */
/* --menuitem-image: url("../icons/code.svg"); */
--menuitem-image: url("../icons/code.svg");
}

#spell-no-suggestions {
Expand Down Expand Up @@ -77,7 +77,7 @@
}
#context-media-loop {
/* checkbox */
/* --menuitem-image: url("../icons/arrow-repeat-all.svg"); */
--menuitem-image: url("../icons/arrow-repeat-all.svg");
}
#context-leave-dom-fullscreen {
--menuitem-image: url("chrome://global/skin/media/fullscreenExitButton.svg");
Expand All @@ -97,7 +97,7 @@
}
#context-video-pictureinpicture {
/* checkbox */
/* --menuitem-image: url("chrome://global/skin/media/picture-in-picture-open.svg"); */
--menuitem-image: url("chrome://global/skin/media/picture-in-picture-open.svg");
}

#context-reloadimage {
Expand Down Expand Up @@ -209,6 +209,7 @@

#spell-check-enabled {
/* checkbox */
--menuitem-image: url("../icons/text-proofing-tools.svg");
}
#spell-add-dictionaries-main {
--menuitem-image: url("../icons/book-add.svg");
Expand Down
7 changes: 7 additions & 0 deletions src/icons/context_menu/_others.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/*= autohide-context =========================================================*/
#autohide-context > menuitem[data-l10n-id="full-screen-autohide"] {
/* checkbox */
--menuitem-image: url("../icons/eye-tracking-off.svg");
}

#autohide-context > menuitem[data-l10n-id="full-screen-exit"] {
Expand Down Expand Up @@ -56,6 +57,7 @@
/*= downloads-button-autohide-panel ==========================================*/
#downloads-button-autohide-checkbox {
/* checkbox */
--menuitem-image: url("../icons/eye-tracking-off.svg");
}

/*= downloadsContextMenu =====================================================*/
Expand All @@ -73,6 +75,11 @@
}
.downloadAlwaysUseSystemDefaultMenuItem {
/* checkbox */
--menuitem-image: url("../icons/folder-globe.svg");
}
.downloadAlwaysOpenSimilarFilesMenuItem {
/* checkbox */
--menuitem-image: url("../icons/fluid.svg");
}
.downloadShowMenuItem {
--menuitem-image: url("chrome://global/skin/icons/folder.svg");
Expand Down
2 changes: 1 addition & 1 deletion src/icons/context_menu/_place.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}
#show-other-bookmarks_PersonalToolbar {
/* checkbox */
/* --menuitem-image: url("../icons/star-line-horizontal.svg"); */
--menuitem-image: url("../icons/star-line-horizontal.svg");
}
#placesContext_showAllBookmarks {
--menuitem-image: url("chrome://browser/skin/bookmark-star-on-tray.svg");
Expand Down
12 changes: 9 additions & 3 deletions src/icons/context_menu/_tab_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,18 @@
.customize-context-moveToPanel {
--menuitem-image: url("chrome://browser/skin/pin-12.svg");
}
.toolbar-context-autohide-downloads-button {
--menuitem-image: url("../icons/password-hide.svg");
#toolbar-context-autohide-downloads-button {
/* checkbox */
--menuitem-image: url("../icons/eye-tracking-off.svg");
}
.customize-context-removeFromToolbar {
--menuitem-image: url("chrome://global/skin/icons/delete.svg");
}

#toolbar-context-always-open-downloads-panel {
/* checkbox */
--menuitem-image: url("../icons/drawer-arrow-download.svg");
}
#toolbar-context-openANewTab {
--menuitem-image: url("chrome://browser/skin/new-tab.svg");
}
Expand All @@ -112,7 +118,7 @@

#toggle_toolbar-menubar {
/* checkbox */
/* --menuitem-image: url("../icons/calendar-agenda.svg"); */
--menuitem-image: url("../icons/calendar-agenda.svg");
}
#toggle_PersonalToolbar {
/* Also placeContext */
Expand Down