Skip to content

Commit 1e8e9c7

Browse files
committed
gtk4: Improve popovers styling
Attempt to look identical with GTK 3, but with more consistent paddings with other menus and items.
1 parent 1896e5e commit 1e8e9c7

File tree

1 file changed

+23
-43
lines changed

1 file changed

+23
-43
lines changed

common/gtk-4.0/sass/_common.scss

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,10 +2080,8 @@ magnifier {
20802080
/**********************
20812081
* Popover Base Menus *
20822082
**********************/
2083-
//FIXME still need some work
2084-
$_menu_bg: if($variant!='dark', $base_color, $bg_color);
20852083

2086-
$_menu-padding: 12px; //inner menuitem padding//FIXME arc paddings??
2084+
$_menu-padding: 8px; //inner menuitem padding
20872085
//global $menu-margin for outside menuitems
20882086

20892087
popover.menu {
@@ -2092,20 +2090,14 @@ popover.menu {
20922090
box.inline-buttons {
20932091
padding: 0 $_menu-padding;
20942092

2095-
button.image-button.model {//FIXME redesign for arc?
2096-
@include button(undecorated);
2093+
button.image-button.model {
2094+
@include button(normal);
20972095

2098-
min-height: 30px;
2099-
min-width: 30px;
2100-
padding: 0;
2101-
border: none;
2102-
outline: none;
2103-
transition: none;
2096+
&, &:dir(ltr) { margin-left: 6px; }
2097+
&:dir(rtl) { margin-right: 6px; }
21042098

2105-
&:selected {
2106-
background: $selected_bg_color;
2107-
color: $selected_fg_color;
2108-
}
2099+
&:focus { @include button(hover); }
2100+
&:active { @include button(active); }
21092101
}
21102102
}
21112103

@@ -2116,54 +2108,42 @@ popover.menu {
21162108
@extend %list_button;
21172109

21182110
padding: 11px;
2119-
&:focus {
2120-
background-color: $selected_bg_color;
2121-
border-color: $selected_bg_color;
2122-
}
2123-
}
2124-
}
2125-
2126-
& > arrow,
2127-
&.background > contents {
2128-
background-color: $_menu_bg;
2129-
padding: 5px;
2130-
}
21312111

2132-
&.background separator {
2133-
margin: 0;
2112+
&:focus { @include button(hover); }
2113+
&:active { @include button(active); }
2114+
}
21342115
}
21352116

21362117
accelerator {
21372118
color: gtkalpha(currentColor,0.55);
21382119

2139-
&:dir(ltr) { margin-left: $_menu-padding; }
2140-
&:dir(rtl) { margin-right: $_menu-padding; }
2120+
&:dir(ltr) { margin-left: 22px; }//$_menu-padding;
2121+
&:dir(rtl) { margin-right: 22px; }//$_menu-padding;
21412122
}
21422123

21432124
arrow.left,
21442125
radio.left,
21452126
check.left {
2146-
margin-left: -2px;
2147-
margin-right: 6px;
2127+
margin-left: -1px;
2128+
margin-right: 7px;
21482129
}
21492130

21502131
arrow.right,
21512132
radio.right,
21522133
check.right {
2153-
margin-left: 6px;
2154-
margin-right: -2px;
2134+
margin-left: 7px;
2135+
margin-right: -1px;
2136+
}
2137+
2138+
scale {
2139+
padding: 5px $_menu-padding;
21552140
}
21562141

21572142
modelbutton {
2158-
min-height: 30px;
2143+
min-height: 16px;
21592144
min-width: 40px;
2160-
padding: 0 $_menu-padding;
2161-
border-radius: 3px;
2162-
2163-
&:selected {
2164-
color: $selected_fg_color;
2165-
background-color: $selected_bg_color;
2166-
}
2145+
padding: 5px $_menu-padding;
2146+
border-radius: 2px;
21672147
}
21682148

21692149
label.title {

0 commit comments

Comments
 (0)