diff options
author | Lapo Calamandrei <calamandrei@gmail.com> | 2016-02-16 17:40:13 +0100 |
---|---|---|
committer | Lapo Calamandrei <calamandrei@gmail.com> | 2016-02-16 17:42:52 +0100 |
commit | 6085bba0a5960390497e429e7a9e41746ff80ac4 (patch) | |
tree | 24df742fc7c525773c47de431f983c8f10528fdb | |
parent | 3a15aa2a957b7a4fc5ecdb21d800b2e81bb2ea47 (diff) | |
download | gtk+-6085bba0a5960390497e429e7a9e41746ff80ac4.tar.gz |
Adwaita: be more specific about menu items height
setting a 16px min-height (same as a check/radio) and resetting
margins on check/radio to workaround a sizing issues there.
-rw-r--r-- | gtk/theme/Adwaita/_common.scss | 8 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained-dark.css | 37 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained.css | 37 |
3 files changed, 48 insertions, 34 deletions
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index e14dcc35f4..e00e4cea61 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1656,6 +1656,7 @@ menubar, &:backdrop { background-color: $backdrop_bg_color; } > menuitem { + min-height: 16px; padding: 4px 8px; &:hover { //Seems like it :hover even with keyboard focus @@ -1682,9 +1683,10 @@ menu, &:backdrop { background-color: $backdrop_menu_color; } menuitem { - text-shadow: none; - padding: 4px; + min-height: 16px; min-width: 40px; + padding: 4px 6px; + text-shadow: none; &:hover { color: $selected_fg_color; @@ -2344,6 +2346,8 @@ radio { } menu menuitem & { + margin: 0; // this is a workaround for a menu check/radio size allocation issue + &, &:hover, &:disabled { min-height: 14px; min-width: 14px; diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 898516d46a..6ab127e2fd 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2023,6 +2023,7 @@ menubar, background-color: #393f3f; } menubar > menuitem, .menubar > menuitem { + min-height: 16px; padding: 4px 8px; } menubar > menuitem:hover, .menubar > menuitem:hover { @@ -2047,9 +2048,10 @@ menu, background-color: #2f3030; } menu menuitem, .menu menuitem { - text-shadow: none; - padding: 4px; - min-width: 40px; } + min-height: 16px; + min-width: 40px; + padding: 4px 6px; + text-shadow: none; } menu menuitem:hover, .menu menuitem:hover { color: #ffffff; @@ -2602,19 +2604,22 @@ radio { text-shadow: none; -gtk-icon-shadow: none; box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); } - menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem - radio, menu menuitem - radio:hover, menu menuitem - radio:disabled { - min-height: 14px; - min-width: 14px; - background-image: none; - background-color: transparent; - box-shadow: none; - -gtk-icon-shadow: none; - color: inherit; - border-color: currentColor; - animation: none; } + menu menuitem check, menu menuitem + radio { + margin: 0; } + menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem + radio, menu menuitem + radio:hover, menu menuitem + radio:disabled { + min-height: 14px; + min-width: 14px; + background-image: none; + background-color: transparent; + box-shadow: none; + -gtk-icon-shadow: none; + color: inherit; + border-color: currentColor; + animation: none; } treeview.view check:selected:focus:disabled, treeview.view check:selected:focus, treeview.view check:selected:backdrop:disabled, treeview.view check:selected:backdrop, treeview.view check:selected:disabled, treeview.view check:selected, check { diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 25039b23f9..864bf5374c 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2033,6 +2033,7 @@ menubar, background-color: #e8e8e7; } menubar > menuitem, .menubar > menuitem { + min-height: 16px; padding: 4px 8px; } menubar > menuitem:hover, .menubar > menuitem:hover { @@ -2057,9 +2058,10 @@ menu, background-color: white; } menu menuitem, .menu menuitem { - text-shadow: none; - padding: 4px; - min-width: 40px; } + min-height: 16px; + min-width: 40px; + padding: 4px 6px; + text-shadow: none; } menu menuitem:hover, .menu menuitem:hover { color: #ffffff; @@ -2627,19 +2629,22 @@ radio { row:selected check, row:selected radio { border-color: #184472; } - menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem - radio, menu menuitem - radio:hover, menu menuitem - radio:disabled { - min-height: 14px; - min-width: 14px; - background-image: none; - background-color: transparent; - box-shadow: none; - -gtk-icon-shadow: none; - color: inherit; - border-color: currentColor; - animation: none; } + menu menuitem check, menu menuitem + radio { + margin: 0; } + menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem + radio, menu menuitem + radio:hover, menu menuitem + radio:disabled { + min-height: 14px; + min-width: 14px; + background-image: none; + background-color: transparent; + box-shadow: none; + -gtk-icon-shadow: none; + color: inherit; + border-color: currentColor; + animation: none; } treeview.view check:selected:focus:disabled, treeview.view check:selected:focus, treeview.view check:selected:backdrop:disabled, treeview.view check:selected:backdrop, treeview.view check:selected:disabled, treeview.view check:selected, check { |