Fix: Global Menubar - Padding at windows #1103
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
alstjr7375 2025-06-04 00:00:00 +09:00
parent bfc9d9435d
commit 42a6a09f32
3 changed files with 45 additions and 18 deletions

32
css/leptonChrome.css generated
View file

@ -250,9 +250,6 @@
color: inherit !important; /* Original: -moz-menubarhovertext */ color: inherit !important; /* Original: -moz-menubarhovertext */
background-color: color-mix(in srgb, currentColor 20%, transparent) !important; /* Original: -moz-menuhover */ background-color: color-mix(in srgb, currentColor 20%, transparent) !important; /* Original: -moz-menuhover */
} }
/*= Linux - Titlebar button at lwtheme =====================================*/
@media not -moz-pref("userChrome.compatibility.os.linux_non_native_titlebar_button") {
}
} }
/*= Linux - Light System Default Theme's Selected Tab ========================*/ /*= Linux - Light System Default Theme's Selected Tab ========================*/
@media (-moz-gtk-csd-available) and (prefers-color-scheme: light) { @media (-moz-gtk-csd-available) and (prefers-color-scheme: light) {
@ -12202,6 +12199,17 @@
#main-menubar > menu menupopup { #main-menubar > menu menupopup {
--menuitem-image: none; /* Prevent Image Inheritance */ --menuitem-image: none; /* Prevent Image Inheritance */
} }
@media (-moz-platform: windows) {
#main-menubar > menu > :is(.menubar-text, .menu-text) {
transform: translateY(-1px) !important; /* Fix menu top padding position */
padding-inline-start: 0.3em !important;
}
}
@media (-moz-gtk-csd-available) {
#main-menubar > menu > :is(.menubar-text, .menu-text) {
padding-inline-start: 3px;
}
}
@media not -moz-pref("userChrome.padding.global_menubar") { @media not -moz-pref("userChrome.padding.global_menubar") {
#main-menubar > menu { #main-menubar > menu {
padding-block: 2px !important; padding-block: 2px !important;
@ -12369,9 +12377,6 @@
--context-menu-background-padding-default: 6px; --context-menu-background-padding-default: 6px;
--context-menu-text-padding: 21px; --context-menu-text-padding: 21px;
} }
#main-menubar > menu > :is(.menubar-text, .menu-text) {
padding-inline-start: 3px;
}
} }
/* Padding - Mac */ /* Padding - Mac */
@media -moz-pref("layout.css.osx-font-smoothing.enabled") { @media -moz-pref("layout.css.osx-font-smoothing.enabled") {
@ -14398,7 +14403,6 @@
color: inherit !important; /* Original: -moz-menubarhovertext */ color: inherit !important; /* Original: -moz-menubarhovertext */
background-color: color-mix(in srgb, currentColor 20%, transparent) !important; /* Original: -moz-menuhover */ background-color: color-mix(in srgb, currentColor 20%, transparent) !important; /* Original: -moz-menuhover */
} }
/*= Linux - Titlebar button at lwtheme =====================================*/
} }
@media (-moz-bool-pref: "userChrome.compatibility.os") and (-moz-gtk-csd-available) and (prefers-color-scheme: light) { @media (-moz-bool-pref: "userChrome.compatibility.os") and (-moz-gtk-csd-available) and (prefers-color-scheme: light) {
/* Because of /* Because of
@ -27735,6 +27739,17 @@
--menuitem-image: none; /* Prevent Image Inheritance */ --menuitem-image: none; /* Prevent Image Inheritance */
} }
} }
@media (not (-moz-bool-pref: "userChrome.icon.disabled")) and (-moz-bool-pref: "userChrome.icon.menu") and (-moz-bool-pref: "userChrome.icon.global_menubar") and (-moz-platform: windows) {
#main-menubar > menu > :is(.menubar-text, .menu-text) {
transform: translateY(-1px) !important; /* Fix menu top padding position */
padding-inline-start: 0.3em !important;
}
}
@media (not (-moz-bool-pref: "userChrome.icon.disabled")) and (-moz-bool-pref: "userChrome.icon.menu") and (-moz-bool-pref: "userChrome.icon.global_menubar") and (-moz-gtk-csd-available) {
#main-menubar > menu > :is(.menubar-text, .menu-text) {
padding-inline-start: 3px;
}
}
@media (not (-moz-bool-pref: "userChrome.icon.disabled")) and (-moz-bool-pref: "userChrome.icon.menu") and (-moz-bool-pref: "userChrome.icon.global_menubar") and (not (-moz-bool-pref: "userChrome.padding.global_menubar")) { @media (not (-moz-bool-pref: "userChrome.icon.disabled")) and (-moz-bool-pref: "userChrome.icon.menu") and (-moz-bool-pref: "userChrome.icon.global_menubar") and (not (-moz-bool-pref: "userChrome.padding.global_menubar")) {
#main-menubar > menu { #main-menubar > menu {
padding-block: 2px !important; padding-block: 2px !important;
@ -27889,9 +27904,6 @@
--context-menu-background-padding-default: 6px; --context-menu-background-padding-default: 6px;
--context-menu-text-padding: 21px; --context-menu-text-padding: 21px;
} }
#main-menubar > menu > :is(.menubar-text, .menu-text) {
padding-inline-start: 3px;
}
} }
@media (not (-moz-bool-pref: "userChrome.icon.disabled")) and (-moz-bool-pref: "userChrome.icon.menu") and (-moz-bool-pref: "layout.css.osx-font-smoothing.enabled") { @media (not (-moz-bool-pref: "userChrome.icon.disabled")) and (-moz-bool-pref: "userChrome.icon.menu") and (-moz-bool-pref: "layout.css.osx-font-smoothing.enabled") {
:root { :root {

View file

@ -379,7 +379,6 @@
color: inherit !important; /* Original: -moz-menubarhovertext */ color: inherit !important; /* Original: -moz-menubarhovertext */
background-color: color-mix(in srgb, currentColor 20%, transparent) !important; /* Original: -moz-menuhover */ background-color: color-mix(in srgb, currentColor 20%, transparent) !important; /* Original: -moz-menuhover */
} }
/*= Linux - Titlebar button at lwtheme =====================================*/
} }
/*= Linux - Light System Default Theme's Selected Tab ========================*/ /*= Linux - Light System Default Theme's Selected Tab ========================*/
@media (-moz-gtk-csd-available) and (-moz-toolbar-prefers-color-scheme: light), @media (-moz-gtk-csd-available) and (-moz-toolbar-prefers-color-scheme: light),
@ -12682,6 +12681,20 @@
#main-menubar > menu menupopup { #main-menubar > menu menupopup {
--menuitem-image: none; /* Prevent Image Inheritance */ --menuitem-image: none; /* Prevent Image Inheritance */
} }
@media (-moz-os-version: windows-win7),
(-moz-os-version: windows-win8),
(-moz-os-version: windows-win10),
(-moz-platform: windows) {
#main-menubar > menu > :is(.menubar-text, .menu-text) {
transform: translateY(-1px) !important; /* Fix menu top padding position */
padding-inline-start: 0.3em !important;
}
}
@media (-moz-gtk-csd-available) {
#main-menubar > menu > :is(.menubar-text, .menu-text) {
padding-inline-start: 3px;
}
}
@supports not -moz-bool-pref("userChrome.padding.global_menubar") { @supports not -moz-bool-pref("userChrome.padding.global_menubar") {
#main-menubar > menu { #main-menubar > menu {
padding-block: 2px !important; padding-block: 2px !important;
@ -13030,9 +13043,6 @@
--context-menu-background-padding-default: 6px; --context-menu-background-padding-default: 6px;
--context-menu-text-padding: 21px; --context-menu-text-padding: 21px;
} }
#main-menubar > menu > :is(.menubar-text, .menu-text) {
padding-inline-start: 3px;
}
} }
/* Padding - Mac */ /* Padding - Mac */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") {

View file

@ -81,6 +81,15 @@ $_layoutCommonMenus: (
menupopup { menupopup {
--menuitem-image: none; /* Prevent Image Inheritance */ --menuitem-image: none; /* Prevent Image Inheritance */
} }
& > :is(.menubar-text, .menu-text) {
@include OS($win) {
transform: translateY(-1px) !important; /* Fix menu top padding position */
padding-inline-start: 0.3em !important;
}
@include OS($linux) {
@include _layout_init_linux;
}
}
@include NotOption("userChrome.padding.global_menubar") { @include NotOption("userChrome.padding.global_menubar") {
padding-block: 2px !important; padding-block: 2px !important;
} }
@ -113,10 +122,6 @@ $_layoutCommonMenus: (
/* Padding - Linux */ /* Padding - Linux */
@include OS($linux) { @include OS($linux) {
@include _layout_root_linux; @include _layout_root_linux;
#{$_globalMenus} > :is(.menubar-text, .menu-text) {
@include _layout_init_linux;
}
} }
/* Padding - Mac */ /* Padding - Mac */