Warning, /plasma/breeze-gtk/src/gtk4/widgets/_treeview.scss is written in an unsupported language. File is not indexed.

0001 @charset "UTF-8";
0002 
0003 @mixin item-hover-middle {
0004         @if $new-highlight {
0005                 background-color: gtk("@theme_selected_bg_color");
0006                 border-left-color: gtk("@theme_selected_fg_color");
0007                 border-top-color: gtk("@theme_selected_fg_color");
0008         } @else {
0009                 background-color: gtkalpha(
0010                         gtk("@theme_selected_bg_color"),
0011                         0.3
0012                 );
0013                 border-left-color: gtk("@theme_fg_color");
0014                 border-top-color: gtk("@theme_fg_color");
0015         }
0016 }
0017 
0018 @mixin item-selected-middle {
0019         @if $new-highlight {
0020                 background-color: gtkalpha(
0021                         gtk("@theme_button_decoration_focus"),
0022                         0.3
0023                 );
0024                 color: gtk("@theme_button_foreground_active");
0025                 border: 1px solid gtk("@theme_button_decoration_focus");
0026                 border-left: 0;
0027                 border-right: 0;
0028                 border-radius: 0px;
0029         } @else {
0030                 background-color: gtk("@theme_selected_bg_color");
0031                 border-left-color: gtk("@theme_selected_fg_color");
0032                 border-top-color: gtk("@theme_selected_fg_color");
0033         }
0034 }
0035 
0036 @mixin item-selected-middle-backdrop {
0037         @if $new-highlight {
0038                 background-color: gtkalpha(
0039                         gtk("@theme_button_decoration_focus_backdrop"),
0040                         0.3
0041                 );
0042                 color: gtk("@theme_button_foreground_active_backdrop");
0043                 border: 1px
0044                         solid
0045                         gtk("@theme_button_decoration_focus_backdrop");
0046                 border-left: 0;
0047                 border-right: 0;
0048                 border-radius: 0px;
0049         } @else {
0050                 background-color: gtk(
0051                         "@theme_unfocused_selected_bg_color"
0052                 );
0053                 border-left-color: gtk(
0054                         "@theme_unfocused_selected_fg_color"
0055                 );
0056                 border-top-color: gtk(
0057                         "@theme_unfocused_selected_fg_color"
0058                 );
0059         }
0060 }
0061 
0062 /**************
0063  * Tree Views *
0064  **************/
0065 treeview.view {
0066         border-left-color: gtk(
0067                 "@borders"
0068         ); // this is actually the tree lines color,
0069         border-top-color: transparent; // while this is the grid lines color, better then nothing
0070 
0071         rubberband {
0072                 @extend rubberband;
0073         } // to avoid borders being overridden by the previously set props
0074 
0075         &:selected {
0076                 border-radius: 0;
0077         } // rest border radius in lists
0078 
0079         &:hover {
0080                 @include item-hover-middle();
0081         }
0082 
0083         &:selected {
0084                 @include item-selected-middle();
0085         }
0086 
0087         &:backdrop:selected {
0088                 @include item-selected-middle-backdrop();
0089         }
0090 
0091         &:disabled {
0092                 color: gtk("@insensitive_borders");
0093                 &:selected {
0094                         color: gtk("@insensitive_selected_fg_color");
0095                         &:backdrop {
0096                                 color: gtk(
0097                                         "@insensitive_unfocused_selected_fg_color"
0098                                 );
0099                         }
0100                 }
0101                 &:backdrop {
0102                         color: gtk("@unfocused_insensitive_borders");
0103                 }
0104         }
0105         &.separator {
0106                 min-height: 2px;
0107                 color: gtk("@borders");
0108         }
0109         &.separator:backdrop {
0110                 color: gtk("@unfocused_borders");
0111         }
0112 
0113         &:backdrop {
0114                 border-left-color: gtk("@unfocused_borders");
0115         }
0116 
0117         &:drop(active) {
0118                 border-style: solid none;
0119                 border-width: 1px;
0120                 border-color: gtk("@theme_button_decoration_hover");
0121         }
0122 
0123         &.expander {
0124                 // GtkTreeView uses the larger of the expander’s min-width and min-height
0125                 min-width: 16px;
0126                 min-height: 16px;
0127                 -gtk-icon-source: -gtk-icontheme($arrow_right);
0128                 color: gtk("@theme_fg_color");
0129                 &:dir(rtl) {
0130                         -gtk-icon-source: -gtk-icontheme(
0131                                 "go-next-rtl-symbolic"
0132                         );
0133                 }
0134                 &:hover {
0135                         color: gtk("@theme_button_decoration_hover");
0136                 }
0137                 &:selected {
0138                         color: gtk("@theme_selected_fg_color");
0139                 }
0140                 &:checked {
0141                         -gtk-icon-source: -gtk-icontheme($arrow_down);
0142                         &:selected {
0143                                 color: gtk("@theme_selected_fg_color");
0144                         }
0145                 }
0146         }
0147         header {
0148                 button {
0149                         @extend %column_header_button;
0150                         color: gtk("@theme_button_foreground_normal");
0151                         background-color: gtk(
0152                                 "@theme_button_background_normal"
0153                         );
0154                         text-shadow: none;
0155                         box-shadow: none;
0156                         &:hover {
0157                                 @extend %column_header_button;
0158                                 color: gtk("@theme_button_foreground_normal");
0159                                 background-color: gtkalpha(
0160                                         gtk("@theme_button_decoration_hover"),
0161                                         0.5
0162                                 );
0163                                 box-shadow: none;
0164                         }
0165                         &:active {
0166                                 @extend %column_header_button;
0167                                 color: gtk("@theme_button_foreground_normal");
0168                                 background-color: gtkalpha(
0169                                         gtk("@theme_button_decoration_hover"),
0170                                         0.5
0171                                 );
0172                         }
0173                 }
0174                 button:last-child {
0175                         &:backdrop,
0176                         & {
0177                                 border-right-style: none;
0178                         }
0179                 }
0180         }
0181         button.dnd,
0182         header.button.dnd {
0183                 // for treeview-like derive widgets
0184                 &:active,
0185                 &:selected,
0186                 &:hover,
0187                 & {
0188                         padding: 0 6px;
0189                         color: gtk("@theme_selected_fg_color");
0190                         background-image: none;
0191                         background-color: gtk("@theme_selected_bg_color");
0192                         border-style: none;
0193                         border-radius: 0;
0194                         box-shadow: none;
0195                         text-shadow: none;
0196                 }
0197         }
0198 }
0199 
0200 %column_header_button {
0201         padding: 6px;
0202         border-style: none solid solid none;
0203         border-radius: 0;
0204         background-image: none;
0205         border-color: gtk("@borders");
0206         text-shadow: none;
0207         &:disabled {
0208                 border-color: gtk("@insensitive_borders");
0209                 color: gtk("@theme_button_foreground_insensitive");
0210                 background-color: gtk(
0211                         "@theme_button_background_insensitive"
0212                 );
0213                 background-image: none;
0214         }
0215         &:backdrop {
0216                 border-color: gtk("@unfocused_borders");
0217                 border-style: none solid solid none;
0218                 color: gtk("@theme_button_foreground_backdrop");
0219                 background-image: none;
0220                 background-color: gtk(
0221                         "@theme_button_background_backdrop"
0222                 );
0223                 &:disabled {
0224                         border-color: gtk("@unfocused_insensitive_borders");
0225                         background-image: none;
0226                         background-color: gtk(
0227                                 "@theme_button_background_backdrop_insensitive"
0228                         );
0229                         color: gtk(
0230                                 "@theme_button_foreground_backdrop_insensitive"
0231                         );
0232                 }
0233         }
0234 }