[sushi] style: use dark theme and remove a lot of custom CSS
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] style: use dark theme and remove a lot of custom CSS
- Date: Mon, 25 Jul 2011 16:21:18 +0000 (UTC)
commit 6a4cefd64b5aacadcf820852705183af84517461
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Jul 25 18:20:34 2011 +0200
style: use dark theme and remove a lot of custom CSS
There's still a bit more custom CSS here than I would like, but this is
a good start.
data/style/gtk-style.css | 89 +++++++++++-----------------------------------
src/js/ui/application.js | 3 ++
2 files changed, 24 insertions(+), 68 deletions(-)
---
diff --git a/data/style/gtk-style.css b/data/style/gtk-style.css
index 0f38ce1..ffd4898 100644
--- a/data/style/gtk-style.css
+++ b/data/style/gtk-style.css
@@ -5,24 +5,11 @@
@define-color info_bg_color @np_bg_color;
@define-color info_fg_color @np_fg_color;
-GtkWindow {
- color: @np_fg_color;
-}
-
* {
background-color: alpha(#000, 0.0);
}
-*:selected {
- background-color: shade (@np_bg_color, 1.55);
-}
-
-*:insensitive {
- color: shade(@np_fg_color, 0.60);
-}
-
SushiFontWidget {
- color: @np_fg_color;
padding: 2;
}
@@ -32,37 +19,28 @@ GtkSourceView {
font: Monospace 10;
}
-.spinner {
- color: @np_fg_color;
-}
-
.scrollbar.slider,
.scrollbar.button {
- color: shade (@np_bg_color, 1.30);
border-color: shade (@np_bg_color, 1.30);
}
.scrollbar.button:prelight,
.scrollbar.slider:prelight {
background-color: shade (@np_bg_color, 1.30);
- color: shade (@np_fg_color, 0.75);
}
.scrollbar.button:prelight:active,
.scrollbar.slider:prelight:active {
background-color: shade (@np_bg_color, 1.55);
border-color: shade (@np_bg_color, 1.55);
- color: shade (@np_fg_color, 0.85);
}
.np-toolbar {
border-style: none;
border-radius: 3;
border-width: 0;
- padding: 0 2;
background-color: @np_bg_color;
- color: @np_fg_color;
}
.np-toolbar GtkSeparatorToolItem {
@@ -71,16 +49,34 @@ GtkSourceView {
border-width: 1;
border-style: solid;
- border-color: shade(@np_fg_color, 0.60);
+}
+
+.np-toolbar .button {
+ border-image: none;
+ background-image: -gtk-gradient(linear,
+ left top, left bottom,
+ from(#333),
+ color-stop(0.50, shade (#333, 1.40)),
+ to (#333));
+}
+
+.np-toolbar .button:hover {
+ background-image: -gtk-gradient(linear,
+ left top, left bottom,
+ from(shade(#333, 1.20)),
+ color-stop(0.50, shade (#333, 1.60)),
+ to (shade(#333, 1.20)));
+}
+
+.np-toolbar GtkLabel {
+ font: Cantarell 8;
}
.np-decoration {
- color: @np_fg_color;
font: bold;
}
.np-decoration.button {
- color: @np_fg_color;
background-image: none;
padding: 4;
@@ -110,46 +106,3 @@ GtkSourceView {
color-stop(0.50, #333),
to(alpha(#333, 0.0)));
}
-
-.np-toolbar {
- padding: 0 4;
-}
-
-.np-toolbar .button {
- border-image: none;
- padding: 0 4;
- background-image: -gtk-gradient(linear,
- left top, left bottom,
- from(#333),
- color-stop(0.50, shade (#333, 1.40)),
- to (#333));
-}
-
-.np-toolbar .button:hover {
- background-image: -gtk-gradient(linear,
- left top, left bottom,
- from(shade(#333, 1.20)),
- color-stop(0.50, shade (#333, 1.60)),
- to (shade(#333, 1.20)));
-}
-
-.np-toolbar GtkScale.slider {
- background-image: none;
- background-color: @np_bg_color;
- border-color: shade (@np_fg_color, 0.8);
-}
-
-.np-toolbar GtkScale.trough {
- border-color: shade (@np_fg_color, 0.8);
- border-width: 1;
- border-style: solid;
- background-image: -gtk-gradient (linear,
- left top, left bottom,
- from (shade(#333, 1.10)),
- to (shade (#333, 1.30)));
-}
-
-.np-toolbar GtkLabel {
- font: Cantarell 8;
- color: @np_fg_color;
-}
diff --git a/src/js/ui/application.js b/src/js/ui/application.js
index dea14bc..d44d083 100644
--- a/src/js/ui/application.js
+++ b/src/js/ui/application.js
@@ -107,6 +107,9 @@ Application.prototype = {
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
provider,
600);
+
+ let settings = Gtk.Settings.get_default();
+ settings.gtk_application_prefer_dark_theme = true;
},
activate : function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]