| 1 |
// Drawing mixins |
| 2 |
|
| 3 |
// generic drawing of more complex things |
| 4 |
|
| 5 |
// provide font size in rem, with px fallback |
| 6 |
@mixin fontsize($size: 24, $base: 16) { |
| 7 |
font-size: round($size) + pt; |
| 8 |
//font-size: ($size / $base) * 1rem; |
| 9 |
} |
| 10 |
|
| 11 |
// Entries |
| 12 |
|
| 13 |
@mixin entry($t, $dark:false) { |
| 14 |
// |
| 15 |
// Entries drawing function |
| 16 |
// |
| 17 |
//@extend %reset_style; |
| 18 |
|
| 19 |
@if $t==normal { |
| 20 |
color: $text_color; |
| 21 |
background-color: $entry_bg; |
| 22 |
border: 1px solid $entry_border; |
| 23 |
box-shadow: inset 0 2px 4px transparentize($entry_bg, 0.95); |
| 24 |
} |
| 25 |
|
| 26 |
@if $t==focus { |
| 27 |
color: $fg_color; |
| 28 |
background-color: $entry_bg; |
| 29 |
border: 1px solid $selected_bg_color; |
| 30 |
box-shadow: inset 0 2px 4px transparentize($entry_bg, 0.95); |
| 31 |
} |
| 32 |
|
| 33 |
@if $t==insensitive { |
| 34 |
color: $insensitive_fg_color; |
| 35 |
background-color: mix($entry_bg, $bg_color, 55%); |
| 36 |
border: 1px solid mix($entry_border, $bg_color, 55%); |
| 37 |
box-shadow: inset 0 2px 4px transparentize(mix($entry_bg, $bg_color, 55%), 0.95); |
| 38 |
} |
| 39 |
|
| 40 |
@if $t==osd { |
| 41 |
color: $osd_fg_color; |
| 42 |
background-color: $osd_entry_bg; |
| 43 |
border: 1px solid $osd_entry_border; |
| 44 |
box-shadow: inset 0 2px 4px transparentize(black, 0.95); |
| 45 |
} |
| 46 |
|
| 47 |
@if $t==osd-focus { |
| 48 |
color: $selected_fg_color; |
| 49 |
background-color: $selected_bg_color; |
| 50 |
border: 1px solid $osd_entry_border; |
| 51 |
box-shadow: inset 0 2px 4px transparentize(black, 0.95); |
| 52 |
} |
| 53 |
|
| 54 |
@if $t==osd-insensitive { |
| 55 |
color: transparentize($osd_fg_color, 0.45); |
| 56 |
background-color: transparentize($osd_entry_bg, 0.15); |
| 57 |
border: 1px solid $osd_entry_border; |
| 58 |
box-shadow: inset 0 2px 4px transparentize(black, 0.95); |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
// Buttons |
| 63 |
|
| 64 |
@mixin button($t) { |
| 65 |
// |
| 66 |
// Button drawing function |
| 67 |
// |
| 68 |
//@extend %reset_style; |
| 69 |
|
| 70 |
text-shadow: 0 1px transparentize($base_color, 1); |
| 71 |
|
| 72 |
@if $t==normal { |
| 73 |
// |
| 74 |
// normal button |
| 75 |
// |
| 76 |
color: $fg_color; |
| 77 |
background-color: $button_bg; |
| 78 |
border: 1px solid $button_border; |
| 79 |
box-shadow: inset 0 1px transparentize($button_bg, 0.95); |
| 80 |
} |
| 81 |
|
| 82 |
@else if $t==focus { |
| 83 |
// |
| 84 |
// focused button |
| 85 |
// |
| 86 |
color: $fg_color; |
| 87 |
background-color: $button_bg; |
| 88 |
border: 1px solid $selected_bg_color; |
| 89 |
box-shadow: inset 0 1px transparentize($button_bg, 0.95) !important; |
| 90 |
} |
| 91 |
|
| 92 |
@else if $t==focus-hover { |
| 93 |
// |
| 94 |
// focused button |
| 95 |
// |
| 96 |
color: $fg_color; |
| 97 |
background-color: $button_bg; |
| 98 |
border: 1px solid $selected_bg_color; |
| 99 |
box-shadow: inset 0 1px transparentize($button_bg, 0.95); |
| 100 |
} |
| 101 |
|
| 102 |
@else if $t==hover { |
| 103 |
// |
| 104 |
// hovered button |
| 105 |
// |
| 106 |
color: $fg_color; |
| 107 |
background-color: lighten($button_bg, 5%); |
| 108 |
border: 1px solid $button_border; |
| 109 |
box-shadow: inset 0 1px transparentize(lighten($button_bg, 5%), 0.95); |
| 110 |
} |
| 111 |
|
| 112 |
@else if $t==active { |
| 113 |
// |
| 114 |
// pushed button |
| 115 |
// |
| 116 |
color: $selected_fg_color; |
| 117 |
background-color: $selected_bg_color; |
| 118 |
border: 1px solid if($variant!='dark', $selected_bg_color, $button_border); |
| 119 |
box-shadow: inset 0 1px transparentize($selected_bg_color, 0.95); |
| 120 |
} |
| 121 |
|
| 122 |
@else if $t==insensitive { |
| 123 |
// |
| 124 |
// insensitive button |
| 125 |
// |
| 126 |
color: $insensitive_fg_color; |
| 127 |
border: 1px solid transparentize($button_border, 0.45); |
| 128 |
background-color: transparentize($button_bg, 0.45); |
| 129 |
box-shadow: inset 0 1px transparentize($button_bg, 0.95); |
| 130 |
} |
| 131 |
|
| 132 |
@else if $t==osd { |
| 133 |
// |
| 134 |
// normal osd button |
| 135 |
// |
| 136 |
color: $osd_fg_color; |
| 137 |
border: 1px solid $osd_button_border; |
| 138 |
background-color: $osd_button_bg; |
| 139 |
box-shadow: inset 0 1px transparentize(black, 0.95); |
| 140 |
} |
| 141 |
|
| 142 |
@else if $t==osd-hover { |
| 143 |
// |
| 144 |
// active osd button |
| 145 |
// |
| 146 |
color: $osd_fg_color; |
| 147 |
border: 1px solid $osd_button_border; |
| 148 |
background-color: opacify(lighten($osd_button_bg, 7%), 0.1); |
| 149 |
box-shadow: inset 0 1px transparentize(black, 0.95); |
| 150 |
} |
| 151 |
|
| 152 |
@else if $t==osd-active { |
| 153 |
// |
| 154 |
// active osd button |
| 155 |
// |
| 156 |
color: $selected_fg_color; |
| 157 |
border: 1px solid $osd_button_border; |
| 158 |
background-color: $selected_bg_color; |
| 159 |
box-shadow: inset 0 1px transparentize($selected_bg_color, 0.95); |
| 160 |
} |
| 161 |
|
| 162 |
@else if $t==osd-insensitive { |
| 163 |
// |
| 164 |
// insensitive osd button |
| 165 |
// |
| 166 |
color: $osd_insensitive_fg_color; |
| 167 |
border: 1px solid $osd_button_border; |
| 168 |
background-color: transparentize($osd_button_bg, 0.15); |
| 169 |
box-shadow: inset 0 1px transparentize(black, 0.95); |
| 170 |
} |
| 171 |
} |