_view.scss (4626B)
1 /*************** 2 ! Generic views 3 ****************/ 4 5 @include exports("view") { 6 * { -GtkTextView-error-underline-color: $error_color; } 7 8 .view { 9 color: $text_color; 10 background-color: $base_color; 11 12 &:insensitive, &:insensitive:insensitive { 13 background-color: shade($base_color, .9); 14 color: mix($text_color, $base_color, .5); 15 } 16 17 &:selected, &:selected:focus { @extend %selected; } 18 } 19 20 .cell { 21 border-width: 0; 22 border-radius: 0; 23 24 &:selected, &:selected:focus { 25 background-color: $selected_bg_color; 26 color: $selected_fg_color; 27 } 28 } 29 30 row { 31 &:selected { 32 &, &:hover, &:focus { 33 -GtkWidget-focus-padding: 1; 34 -GtkWidget-focus-line-width: 0; 35 36 border: 0; 37 background-color: $selected_bg_color; 38 background-image: none; 39 color: $selected_fg_color; 40 } 41 } 42 } 43 44 .content-view { 45 &.view { 46 background-color: $base_color; 47 48 &:prelight { background-color: alpha($selected_bg_color, .6); } 49 50 &:selected, &:active { background-color: $selected_bg_color; } 51 52 &:insensitive { background-color: shade($base_color, .9); } 53 54 &.check { 55 &, &:active, &:prelight, &:insensitive, &:selected { background-color: transparent; } 56 } 57 } 58 59 .subtitle { 60 font: smaller; 61 padding: 0 12px; 62 } 63 } 64 65 GtkIconView { 66 &.content-view.check { @extend .content-view.check; } 67 68 &.view.cell { 69 &:selected, &:selected:focus { 70 border: 0; 71 border-radius: 2px; 72 background-image: none; 73 background-color: $selected_bg_color; 74 color: $selected_fg_color; 75 } 76 } 77 } 78 79 .dim-label { 80 &, &.view { color: alpha(currentColor, .5); } 81 } 82 83 .dnd { border: 1px solid $selected_bg_color; } 84 85 .grip { background-color: transparent; } 86 87 .arrow { color: alpha(currentColor, .7); } 88 89 .rubberband { 90 &, &.view, &.content-view.view { 91 border: 1px solid $selected_bg_color; 92 border-radius: 0; 93 background-color: alpha($selected_bg_color, .3); 94 } 95 } 96 97 GdMainIconView.content-view { -GdMainIconView-icon-size: 40; } 98 99 /* this will get overridden by .view, needed by gedit line numbers */ 100 GtkTextView { background-color: mix($bg_color, $base_color, .5); } 101 102 GtkHTML { 103 @extend .view; 104 105 &:insensitive { background-color: shade($base_color, .9); } 106 } 107 108 GtkDrawingArea { background-color: transparent; } 109 } 110 111 /************ 112 ! Treeview * 113 *************/ 114 115 @include exports("treeview") { 116 GtkTreeView { 117 -GtkTreeView-expander-size: 8; 118 -GtkTreeView-vertical-separator: 0; 119 120 outline-offset: -1px; 121 122 &.dnd { border: 1px solid $selected_bg_color; } 123 124 .entry { 125 border-radius: 0; 126 background-color: $base_color; 127 background-image: none; 128 } 129 } 130 } 131 132 133 /*********** 134 ! Separator 135 ************/ 136 137 @include exports("separator") { 138 .view.separator, .separator { 139 color: shade($bg_color, ($contrast + .1)); 140 border: 1px solid currentColor; 141 } 142 } 143 144 145 /********************* 146 ! Column view headers 147 **********************/ 148 149 @include exports("columnheader") { 150 column-header { 151 .button { 152 &, &:active { 153 border-width: 0 1px 1px 0; 154 border-radius: 0; 155 } 156 157 &, &:active, &:focus, &:active:focus { 158 border-color: shade($base_color, .9); 159 border-bottom-color: shade($base_color, .8); 160 background-color: shade($base_color, .97); 161 background-image: none; 162 } 163 164 &:hover, &:active:hover, &:hover:focus, &:active:hover:focus { 165 border-color: shade($base_color, .9); 166 border-bottom-color: shade($base_color, .8); 167 background-color: shade($base_color, .99); 168 background-image: none; 169 } 170 171 &:last-child .button { border-width: 0 0 1px; } 172 } 173 } 174 } 175 176 177 /********** 178 ! Frames * 179 ***********/ 180 181 @include exports("frame") { 182 .frame { 183 border: 1px solid border_normal($bg_color); 184 185 &.flat { border: 0; } 186 } 187 188 /* avoid double borders when a viewport is packed into a GtkScrolledWindow */ 189 GtkScrolledWindow GtkViewport.frame { border: 0; } 190 } 191