From e42253e9976fc4fab07d47396c2cddef5cf4fa28 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Sat, 20 Dec 2014 03:11:02 +0530 Subject: [PATCH] Style more widgets --- gtk-3.0/scss/_functions.scss | 2 +- gtk-3.0/scss/_global.scss | 2 +- gtk-3.0/scss/apps/_gnome-applications.scss | 33 ++++++++------------ gtk-3.0/scss/apps/_nemo.scss | 36 ++++++++++++++++++++++ gtk-3.0/scss/apps/_synaptic.scss | 15 +++++++++ gtk-3.0/scss/{widgets.scss => gtk.scss} | 6 ++++ gtk-3.0/scss/widgets/_base.scss | 8 ++--- gtk-3.0/scss/widgets/_calendar.scss | 6 ++++ gtk-3.0/scss/widgets/_grid.scss | 2 +- gtk-3.0/scss/widgets/_view.scss | 2 +- 10 files changed, 83 insertions(+), 29 deletions(-) create mode 100644 gtk-3.0/scss/apps/_nemo.scss create mode 100644 gtk-3.0/scss/apps/_synaptic.scss rename gtk-3.0/scss/{widgets.scss => gtk.scss} (98%) diff --git a/gtk-3.0/scss/_functions.scss b/gtk-3.0/scss/_functions.scss index 6abc15c..1986d84 100755 --- a/gtk-3.0/scss/_functions.scss +++ b/gtk-3.0/scss/_functions.scss @@ -39,7 +39,7 @@ $modules: () !default; } @function border_insensitive($color) { - @return shade($color, ($contrast + .1)); + @return shade($color, ($contrast + .10)); } @mixin linear-gradient($color, $direction: to bottom) { diff --git a/gtk-3.0/scss/_global.scss b/gtk-3.0/scss/_global.scss index 86f89e7..3c51646 100755 --- a/gtk-3.0/scss/_global.scss +++ b/gtk-3.0/scss/_global.scss @@ -53,6 +53,6 @@ $lightdm_fg_color: $dark_fg_color; // widget styles $roundness: 2px; -$spacing: 6px; +$spacing: 5px; $gradient: 0; $contrast: .7; diff --git a/gtk-3.0/scss/apps/_gnome-applications.scss b/gtk-3.0/scss/apps/_gnome-applications.scss index 2c46b88..91c4f34 100644 --- a/gtk-3.0/scss/apps/_gnome-applications.scss +++ b/gtk-3.0/scss/apps/_gnome-applications.scss @@ -96,7 +96,7 @@ .toolbar { border-width: 0 0 1px; border-style: solid; - border-color: shade($toolbar_bg_color, 0.8); + border-color: border_normal($toolbar_bg_color); } .sidebar .frame { border: none; } @@ -106,7 +106,7 @@ border-style: solid; &, &:hover { - border-color: shade($bg_color, 0.8); + border-color: shade($bg_color, ($contrast + .10)); background-color: $bg_color; } } @@ -136,7 +136,7 @@ border-color: $toolbar_bg_color; background-color: shade($toolbar_bg_color, 0.9); - &:nth-child(2) { border-color: shade($toolbar_bg_color, 0.8); } + &:nth-child(2) { border-color: border_normal($toolbar_bg_color); } &.search-bar { border-top-width: 0; @@ -146,7 +146,7 @@ &, &.search-bar { &:only-child { border-bottom-width: 1px; - border-bottom-color: shade($toolbar_bg_color, 0.8); + border-bottom-color: border_normal($toolbar_bg_color); } } @@ -165,7 +165,7 @@ border-style: solid; &, &:hover { - border-color: shade($bg_color, 0.8); + border-color: shade($bg_color, ($contrast + .10)); background-color: $bg_color; } } @@ -211,7 +211,7 @@ .gedit-document-panel-group-row { &, &:hover { - border-top: 1px solid shade($bg_color, 0.9); + border-top: 1px solid shade($bg_color, ($contrast + .10)); background-color: $bg_color; } } @@ -220,10 +220,7 @@ &:hover { background-color: shade($bg_color, 1.05); } &:selected { - &, &:hover { - background-color: $selected_bg_color; - color: $selected_fg_color; - } + &, &:hover { @extend %selected; } } } @@ -239,7 +236,7 @@ transition: all 200ms ease-in; } - GeditStatusbar { border-top: 1px solid shade($bg_color, 0.8); } + GeditStatusbar { border-top: 1px solid border_normal($bg_color); } GeditStatusbar GeditSmallButton, GeditStatusMenuButton { text-shadow: none; @@ -251,7 +248,7 @@ border-radius: 0; padding: 1px 6px 2px 4px; - &:hover, &:active, &:active:hover { border-color: shade($bg_color, 0.8); } + &:hover, &:active, &:active:hover { border-color: border_normal($bg_color); } &:active { background-color: shade($bg_color, 0.95); @@ -265,7 +262,7 @@ border-radius: 0 0 $roundness $roundness; border-width: 0 1px 1px 1px; border-style: solid; - border-color: shade($base_color, 0.8); + border-color: border_normal($base_color); background-color: $base_color; .not-found { @@ -273,10 +270,7 @@ background-image: none; color: $error_fg_color; - &:selected { - background-color: $selected_bg_color; - color: $selected_fg_color; - } + &:selected { @extend %selected; } } } @@ -315,10 +309,7 @@ background-color: $base_color; color: $text_color; - &:focus, &:hover, &:active, &:selected { - background-color: $selected_bg_color; - color: $selected_fg_color; - } + &:focus, &:hover, &:active, &:selected { @extend %selected; } } } diff --git a/gtk-3.0/scss/apps/_nemo.scss b/gtk-3.0/scss/apps/_nemo.scss new file mode 100644 index 0000000..63518aa --- /dev/null +++ b/gtk-3.0/scss/apps/_nemo.scss @@ -0,0 +1,36 @@ +/******** + ! Nemo * +*********/ + +@include exports("nemo") { + .nemo-desktop.nemo-canvas-item { + color: white; + text-shadow: 1px 1px black; + + &:active { color: $fg_color; } + + &:selected { color: $selected_fg_color; } + + &:active, &:prelight, &:selected { text-shadow: none; } + } + + NemoPathbarButton { + @include button($toolbar_bg_color, $toolbar_fg_color); + + -NemoPathbarButton-border-radius: $roundness; + } + + NemoPlacesTreeView { + -NemoPlacesTreeView-disk-full-bg-color: shade($toolbar_bg_color, 0.8); + -NemoPlacesTreeView-disk-full-fg-color: $selected_bg_color; + -NemoPlacesTreeView-disk-full-bar-width: 1px; + -NemoPlacesTreeView-disk-full-bar-radius: 1px; + -NemoPlacesTreeView-disk-full-bottom-padding: 2px; + -NemoPlacesTreeView-disk-full-max-length: 70px; + + &:selected { + -NemoPlacesTreeView-disk-full-bg-color: $selected_fg_color; + -NemoPlacesTreeView-disk-full-fg-color: shade($selected_bg_color, 1.2); + } + } +} diff --git a/gtk-3.0/scss/apps/_synaptic.scss b/gtk-3.0/scss/apps/_synaptic.scss new file mode 100644 index 0000000..ca67412 --- /dev/null +++ b/gtk-3.0/scss/apps/_synaptic.scss @@ -0,0 +1,15 @@ +/************ + ! Synaptic * +*************/ + +@include exports("synaptic") { + GtkWindow > GtkVBox > .dock { + &, > GtkHBox > GtkToolbar { + @include linear-gradient($toolbar-bg-color); + + padding: $spacing; + border: none; + color: $toolbar_fg_color; + } + } +} diff --git a/gtk-3.0/scss/widgets.scss b/gtk-3.0/scss/gtk.scss similarity index 98% rename from gtk-3.0/scss/widgets.scss rename to gtk-3.0/scss/gtk.scss index 3dfd4ff..e191304 100755 --- a/gtk-3.0/scss/widgets.scss +++ b/gtk-3.0/scss/gtk.scss @@ -2,6 +2,7 @@ @import "global"; @import "colors"; + @import "widgets/base"; @import "widgets/button"; @import "widgets/entry"; @@ -23,6 +24,11 @@ @import "widgets/window"; +@import "apps/gnome-applications"; +@import "apps/nemo"; +@import "apps/synaptic"; + + /************** * action-bar * **************/ diff --git a/gtk-3.0/scss/widgets/_base.scss b/gtk-3.0/scss/widgets/_base.scss index d2f95c7..a1916f6 100755 --- a/gtk-3.0/scss/widgets/_base.scss +++ b/gtk-3.0/scss/widgets/_base.scss @@ -48,7 +48,7 @@ ! Base states *************/ -%selected_items { +%selected { &, &:focus { background-color: $selected_bg_color; color: $selected_fg_color; @@ -56,7 +56,7 @@ } * { - &:selected { @extend %selected_items; } + &:selected { @extend %selected; } &:insensitive, &:insensitive:insensitive { color: mix($fg_color, $bg_color, 0.50); } @@ -103,7 +103,7 @@ color: mix($fg_color, $bg_color, 0.50); } - &:selected { @extend %selected_items; } + &:selected { @extend %selected; } } GtkImage, GtkLabel, GtkBox, GtkGrid { @@ -117,7 +117,7 @@ GtkLabel { @extend .dim-label; } - &:selected { @extend %selected_items; } + &:selected { @extend %selected; } &:insensitive { color: mix($fg_color, $bg_color, 0.50); } } diff --git a/gtk-3.0/scss/widgets/_calendar.scss b/gtk-3.0/scss/widgets/_calendar.scss index 6f2a34b..ee88e64 100644 --- a/gtk-3.0/scss/widgets/_calendar.scss +++ b/gtk-3.0/scss/widgets/_calendar.scss @@ -19,5 +19,11 @@ &.highlight { color: $selected_bg_color; } } + + /* gnome-calendar */ + .calendar-view { + background-color: $base_color; + color: $text_color; + } } diff --git a/gtk-3.0/scss/widgets/_grid.scss b/gtk-3.0/scss/widgets/_grid.scss index fbbfd56..877707c 100644 --- a/gtk-3.0/scss/widgets/_grid.scss +++ b/gtk-3.0/scss/widgets/_grid.scss @@ -37,7 +37,7 @@ border-radius: $roundness; &:selected { - @extend %selected_items; + @extend %selected; outline-offset: -2px; } diff --git a/gtk-3.0/scss/widgets/_view.scss b/gtk-3.0/scss/widgets/_view.scss index bda6711..6a96596 100644 --- a/gtk-3.0/scss/widgets/_view.scss +++ b/gtk-3.0/scss/widgets/_view.scss @@ -12,7 +12,7 @@ color: mix($text_color, $base_color, 0.5); } - &:selected, &:selected:focus { @extend %selected_items; } + &:selected, &:selected:focus { @extend %selected; } } .cell {