gtk-4.0/widgets/_popovers.scss 3.6 K raw
1
/***************
2
 * Popovers   *
3
 ***************/
4
5
popover.background {
6
7
  background-color: transparent;
8
  font: initial;
9
10
  > arrow,
11
  > contents {
12
    $_popover_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
13
14
    background-color: $main_dark_color;
15
    background-clip: padding-box;
16
    border: 1px solid $borders_color;
17
    box-shadow: 0 4px 6px $menu_shadow_color;
18
    color: $fg_color;
19
  }
20
21
  &:backdrop {
22
    background-color: transparent;
23
    box-shadow: none;
24
  }
25
26
  > contents {
27
    padding: 8px;
28
    border-radius: 5px;
29
30
    > list,
31
    > .view,
32
    > toolbar {
33
      border-style: none;
34
      background-color: transparent;
35
    }
36
37
    separator {
38
      background-color: mix($bg_color, $base_color, 30%);
39
      margin: 3px;
40
    }
41
42
    list separator { margin: 0; }
43
  }
44
45
  .osd &,
46
  &.touch-selection,
47
  &.magnifier {
48
    background-color: transparent;
49
50
    > arrow,
51
    > contents {
52
      @extend %osd;
53
54
      border: 1px solid transparentize(white, 0.9);
55
      box-shadow: none;
56
    }
57
  }
58
59
  &.touch-selection,
60
  &.magnifier {
61
    button { @extend %osd_button; }
62
  }
63
}
64
65
magnifier {
66
  background-color: $base_color;
67
}
68
69
70
/**********************
71
 * Popover Base Menus *
72
 **********************/
73
74
 $_menu-padding: 12px; //inner menuitem padding
75
 //global 5px for outside menuitems
76
 
77
 popover.menu {
78
   padding: 0;
79
 
80
   box.inline-buttons {
81
     padding: 0 $_menu-padding;
82
 
83
     button.image-button.model {
84
       @include button(undecorated);
85
 
86
       min-height: 30px;
87
       min-width: 30px;
88
       padding: 0;
89
       border: none;
90
       outline: none;
91
       transition: none;
92
 
93
       &:selected {
94
         background: image($popover_hover_color);
95
 
96
        //  @if $contrast == 'high' {
97
        //    box-shadow: inset 0 0 0 1px $borders_color;
98
        //  }
99
       }
100
     }
101
   }
102
 
103
   box.circular-buttons {
104
     padding: $_menu-padding $_menu-padding 6px;
105
 
106
     button.circular.image-button.model {
107
      // @extend %list_button;
108
 
109
       padding: 11px;
110
       &:focus {
111
          background-color: $popover_hover_color;
112
          border-color: $popover_hover_color;
113
       }
114
     }
115
   }
116
 
117
   & > arrow,
118
   &.background > contents {
119
     background-color: $main_dark_color;
120
     color: $fg_color;
121
     padding: 5px;
122
     .view {
123
      background-color: transparent;
124
      row { margin: 0; }
125
     }
126
   }
127
 
128
   &.background separator {
129
     margin: 6px 0;
130
   }
131
 
132
   accelerator {
133
     color: gtkalpha(currentColor,0.55);
134
 
135
     &:dir(ltr) { margin-left: $_menu-padding; }
136
     &:dir(rtl) { margin-right: $_menu-padding; }
137
   }
138
139
   check,
140
   radio {
141
   //  @include check('menu', 'transparent', $text_color);
142
 
143
     &:hover, &:active { background-color: transparent; }
144
   }
145
 
146
 
147
   radio { border-color: $borders_color;
148
    &:active { border-color: transparentize($borders_color,0.5); }
149
  }
150
151
152
   arrow.left,
153
   radio.left,
154
   check.left {
155
     margin-left: -2px;
156
     margin-right: 6px;
157
   }
158
 
159
   arrow.right,
160
   radio.right,
161
   check.right {
162
     margin-left: 6px;
163
     margin-right: -2px;
164
   }
165
 
166
   modelbutton, &.background > contents .view row {
167
     min-height: 30px;
168
     min-width: 40px;
169
     padding: 0 $_menu-padding;
170
     border-radius: 5px;
171
 
172
     &:selected {
173
       &, label { color: $text-color; }
174
       background-color: $popover_hover_color;
175
     }
176
     &:selected:active {
177
       //@extend %selected_items;
178
       //color: $selected_fg_color;
179
       background-color: lighten($popover_hover_color, 10%); // matching buttons
180
     }
181
   }
182
 
183
   label.title {
184
     font-weight: bold;
185
     padding: 4px ($_menu-padding + 20px); //this will fall apart with font sizing
186
   }
187
 }