one-dark/gtk-3.0/sass/ui/treeview.scss

168 lines
3.6 KiB
SCSS
Raw Normal View History

2022-05-13 18:38:41 +08:00
//
// Tree Views
//
2022-05-13 19:46:55 +08:00
2022-05-13 18:38:41 +08:00
treeview.view {
@at-root * {
2022-05-13 19:46:55 +08:00
-GtkTreeView-horizontal-separator: 0;
2022-05-13 18:38:41 +08:00
-GtkTreeView-grid-line-width: 1;
-GtkTreeView-grid-line-pattern: '';
-GtkTreeView-tree-line-width: 1;
-GtkTreeView-tree-line-pattern: '';
2022-05-13 19:46:55 +08:00
// 树形菜单的小箭头, 设为0, 就不给折叠了
2022-05-18 18:48:46 +08:00
-GtkTreeView-expander-size: 16;
2022-05-13 18:38:41 +08:00
}
2022-05-13 19:46:55 +08:00
2022-05-13 18:38:41 +08:00
border-left-color: transparentize($fg_color, 0.85); // this is actually the tree lines color,
border-top-color: transparentize(
black,
0.9
); // while this is the grid lines color, better then nothing
rubberband {
@extend rubberband;
} // to avoid borders being overridden by the previously set props
acceleditor > label {
background-color: $selected_bg_color;
}
&:selected {
&,
&:focus {
border-radius: 0;
border-left-color: mix($selected_fg_color, $selected_bg_color, 50%);
border-top-color: transparentize($fg_color, 0.9); // doesn't work unfortunatelly
@extend %selected_items;
}
}
&:disabled {
color: $insensitive_fg_color;
&:selected {
color: mix($selected_fg_color, $selected_bg_color, 40%);
}
}
&.separator {
min-height: 2px;
color: transparentize(black, 0.9);
}
&:drop(active) {
border-style: solid none;
border-width: 1px;
border-color: mix($fg_color, $selected_bg_color, 50%);
&.after {
border-top-style: none;
}
&.before {
border-bottom-style: none;
}
}
&.expander {
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
2022-05-13 19:46:55 +08:00
background-color: #f30;
2022-05-13 18:38:41 +08:00
&:dir(rtl) {
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl');
}
color: mix($fg_color, $base_color, 50%);
&:hover {
color: $fg_color;
}
&:selected {
color: mix($selected_fg_color, $selected_bg_color, 70%);
&:hover {
color: $selected_fg_color;
}
}
&:checked {
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
}
}
&.progressbar,
&.progressbar:focus {
// progress bar in treeviews
color: $selected_fg_color;
border-radius: 2px;
background-color: $selected_bg_color;
&:selected,
&:selected:focus {
color: $selected_bg_color;
box-shadow: none;
background-color: $selected_fg_color;
}
}
&.trough {
// progress bar trough in treeviews
color: $fg_color;
background-color: $trough_color_treeview;
border-radius: 2px;
border: 1px solid $button_border;
&:selected,
&:selected:focus {
color: $selected_fg_color;
background-color: transparentize(black, 0.8);
border-radius: 2px;
border-width: 0;
}
}
header {
2022-05-13 19:46:55 +08:00
2022-05-13 18:38:41 +08:00
button {
$_column_header_color: mix($fg_color, $base_color, 80%);
padding: 3px 6px;
font-weight: bold;
color: $_column_header_color;
background-color: darken($bg_color, 1%);
background-image: none;
border-style: none solid solid none;
border-radius: 0;
border-color: $borders_color;
&:active,
&:hover {
2022-05-13 19:46:55 +08:00
background-color: $highlight_color;
2022-05-13 18:38:41 +08:00
}
&:active:hover {
color: $fg_color;
}
&:disabled {
border-color: $bg_color;
background-image: none;
}
&:last-child {
border-right-style: none;
}
}
}
button.dnd,
header.button.dnd {
&,
&:selected,
&:hover,
&:active {
transition: none;
color: $selected_bg_color;
box-shadow: inset 1px 1px 0 1px $selected_bg_color, inset -1px 0 0 1px $selected_bg_color,
inset 1px 1px $base_color, inset -1px 0 $base_color;
}
}
}