diff --git a/src/gtk320/widgets/_base.scss b/src/gtk320/widgets/_base.scss index 2b08fb4..6096bf0 100644 --- a/src/gtk320/widgets/_base.scss +++ b/src/gtk320/widgets/_base.scss @@ -1,270 +1,260 @@ @function gtkalpha($c,$a) { @return unquote("alpha(#{$c},#{$a})"); } $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); * { padding: 0; -GtkToolButton-icon-spacing: 4; -GtkTextView-error-underline-color: $error_color; - -GtkButton-child-displacement-x: 0; - -GtkButton-child-displacement-y: 0; - - -GtkCheckButton-indicator-size: 18; - -GtkCheckMenuItem-indicator-size: 18; - // The size for scrollbars. The slider is 2px smaller, but we keep it // up so that the whole area is sensitive to button presses for the // slider. The stepper button is larger in both directions, the slider // only in the width -GtkScrolledWindow-scrollbar-spacing: 0; - -GtkScrolledWindow-scrollbars-within-bevel: 0; -GtkScrolled-window-overlay-scrolling: FALSE; -GtkToolItemGroup-expander-size: 11; - -GtkExpander-expander-size: 16; -GtkTreeView-expander-size: 11; -GtkTreeView-horizontal-separator: 4; -GtkWidget-text-handle-width: 20; -GtkWidget-text-handle-height: 20; -GtkDialog-button-spacing: 4; -GtkDialog-action-area-border: 0; - -GtkStatusbar-shadow-type: none; - outline-width: 0px; } /*************** * Base States * ***************/ .background { color: w_color(text); background-color: w_color(normal); &:backdrop { text-shadow: none; -gtk-icon-shadow: none; color: backdrop(w_color(text)); background-color: backdrop(w_color(normal)); } } /* These wildcard seems unavoidable, need to investigate. Wildcards are bad and troublesome, use them with care, or better, just don't. Everytime a wildcard is used a kitten dies, painfully. */ *:disabled { -gtk-icon-effect: dim; } .gtkstyle-fallback { background-color: w_color(normal); color: w_color(text); &:hover { background-color: lighten(w_color(normal), 10%); color: w_color(text); } &:active { background-color: darken(w_color(normal), 10%); color: w_color(text); } &:disabled { background-color: insensitive(w_color(normal)); color: insensitive(w_color(text)); } &:selected { background-color: s_color(normal); color: s_color(text); } } %view, .view { color: v_color(text); background-color: v_color(normal); &:backdrop { color: backdrop(v_color(text)); background-color: backdrop(v_color(normal)); } &:disabled { color: insensitive(v_color(text)); } &:selected { &:focus, & { border-radius: $r; @extend %selected_items; } } } .view, textview { text { @extend %view; selection { &:focus, & { @extend %selected_items; }} } } textview border { background-color: v_color(normal); background-image: image($border_color); // HACK: the border node just draws background so, background-repeat: no-repeat; // using a background-image to draw the border &:backdrop { background-color: backdrop(v_color(normal)); } &.bottom { background-size: 100% 1px; background-position: top; } &.top { background-size: 100% 1px; background-position: bottom; } &.left { background-size: 1px 100%; background-position: right; } &.right { background-size: 1px 100%; background-position: left; } } .rubberband, rubberband { border: 1px solid s_color(normal); background-color: transparentize(s_color(normal),0.8); &:backdrop { border-color: backdrop(s_color(normal)); background-color: backdrop(transparentize(s_color(normal),0.8)); } } flowbox { rubberband { @extend rubberband; } flowboxchild { padding: 3px; border-radius: $r; &:selected { @extend %selected_items; outline-offset: 0px; } } } label { &.separator { color: w_color(text); @extend .dim-label; &:backdrop { color: backdrop(w_color(text)); } } selection { background-color: s_color(normal); color: s_color(text) } &:disabled { color: insensitive(w_color(text)); selection { @extend %selected_items:disabled; } &:backdrop { color: backdrop(insensitive(w_color(text))); } } &:backdrop { color:backdrop(w_color(text)); selction {@extend %selected_items:backdrop;} } } .dim-label { opacity: 0.5; text-shadow: none; } assistant { .sidebar { background-color: v_color(text); border-top: 1px solid $border_color; &:backdrop { background-color: backdrop(v_color(text)); border-color: backdrop($border_color); } } &.csd .sidebar { border-top-style: none; } .sidebar label { padding: 6px 12px; } .sidebar label.highlight { background-color: mix(v_color(normal), v_color(text), 80%); } } %osd, .osd { color: w_color(text); border: 1px solid $border_color; background-color: transparentize(w_color(normal),0.2); background-clip: padding-box; box-shadow: none; text-shadow: none; -gtk-icon-shadow: none; &:backdrop { color: backdrop(w_color(text)); background-color: backdrop(transparentize(w_color(normal),0.2)); -gtk-icon-shadow: none; } } %selected_items { background-color: s_color(normal); color: s_color(text); &:hover { background-color: s_color(hover); color: w_color(text); } &:backdrop { background-color: backdrop(s_color(backdrop)); color: backdrop(v_color(normal)); } } %selected_items { background-color: s_color(normal); border-radius: 0px; @at-root %nobg_selected_items, & { color: s_color(text); &:disabled { color: insensitive(s_color(text)); } &:backdrop { color: backdrop(s_color(text)); &:disabled { color: backdrop(insensitive(s_color(text))); } } } } diff --git a/src/gtk320/widgets/_treeview.scss b/src/gtk320/widgets/_treeview.scss index d11742a..17bc88a 100644 --- a/src/gtk320/widgets/_treeview.scss +++ b/src/gtk320/widgets/_treeview.scss @@ -1,135 +1,138 @@ /************** * Tree Views * **************/ treeview.view { -GtkTreeView-grid-line-width: 0; -GtkTreeView-grid-line-pattern: ''; -GtkTreeView-tree-line-width: 1; -GtkTreeView-tree-line-pattern: ''; -GtkTreeView-expander-size: 16; border-left-color: $border_color; // this is actually the tree lines color, border-top-color: transparent; // while this is the grid lines color, better then nothing rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props &:selected { border-radius: 0; } // rest border radius in lists &:selected { background-color: s_color(normal); border-left-color: s_color(text); border-top-color: s_color(text); // doesn't work unfortunatelly } &:backdrop:selected { background-color: backdrop(s_color(backdrop)); border-left-color: backdrop(s_color(text)); border-top-color: backdrop(s_color(text)); } &:disabled { color: insensitive($border_color); &:selected { color: insensitive(s_color(text)); &:backdrop { color: backdrop(insensitive(s_color(text))); } } &:backdrop { color: backdrop(insensitive($border_color)); } } &.separator { min-height: 2px; color: $border_color; } &.separator:backdrop { color: backdrop($border_color); } &:backdrop { border-left-color: backdrop($border_color); } &:drop(active) { border-style: solid none; border-width: 1px; border-color: b_color(hover); } &.expander { + // GtkTreeView uses the larger of the expander’s min-width and min-height + min-width: 16px; + min-height: 16px; -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); color: v_color(text); &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }; &:hover { color: b_color(hover); } &:selected { color: s_color(text); } &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); &:selected { color: s_color(text); } &:backdrop { color: backdrop(v_color(normal)); } } &:backdrop { color: backdrop(v_color(normal)); } } header { button { @extend %column_header_button; color: b_color(text); background-color: b_color(normal); text-shadow: none; box-shadow: none; &:hover { @extend %column_header_button; color: b_color(text); background-color: transparentize(b_color(hover), 0.5); box-shadow: none; transition: none; //I shouldn't need this } &:active { @extend %column_header_button; color: b_color(text); background-color: transparentize(b_color(hover), 0.5); transition: none; //I shouldn't need this } } button:last-child { &:backdrop, & { border-right-style: none; }} } button.dnd, header.button.dnd { // for treeview-like derive widgets &:active, &:selected, &:hover, & { padding: 0 6px; color: s_color(text); background-image: none; background-color: s_color(normal); border-style: none; border-radius: 0; box-shadow: none; text-shadow: none; transition: none; } } } %column_header_button { padding: 6px; border-style: none solid solid none; border-radius: 0; background-image: none; border-color: $border_color; text-shadow: none; &:disabled { border-color: insensitive($border_color); color: insensitive(b_color(text)); background-color: insensitive(b_color(normal)); background-image: none; } &:backdrop { border-color: backdrop($border_color); border-style: none solid solid none; color: backdrop(b_color(text)); background-image: none; background-color: backdrop(b_color(normal)); &:disabled { border-color: backdrop(insensitive($border_color)); background-image: none; background-color: backdrop(insensitive(b_color(normal))); color: backdrop(insensitive(b_color(text))); } } }