Merge "Add more theme color options"
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 74f5d82..8610dba 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -2250,6 +2250,31 @@
+
By default a shade of yellow, `FFFFCC`.
+[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
++
+Background color used for patch outdated messages. The value must be
+a valid HTML hex color code, or standard color name.
++
+By default a shade of red, `FF0000`.
+
+[[theme.tableOddRowColor]]theme.tableOddRowColor::
++
+Background color for tables such as lists of open reviews for odd
+rows. This is so you can have a different color for odd and even
+rows of the table. The value must be a valid HTML hex color code,
+or standard color name.
++
+By default transparent.
+
+[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
++
+Background color for tables such as lists of open reviews for even
+rows. This is so you can have a different color for odd and even
+rows of the table. The value must be a valid HTML hex color code,
+or standard color name.
++
+By default transparent.
+
A different theme may be used for signed-in vs. signed-out user status
by using the "signed-in" and "signed-out" theme sections. Variables
not specified in a section are inherited from the default theme.
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/HostPageData.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/HostPageData.java
index c3d3f1e..f991f4c 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/HostPageData.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/HostPageData.java
@@ -31,5 +31,8 @@
public String textColor;
public String trimColor;
public String selectionColor;
+ public String changeTableOutdatedColor;
+ public String tableOddRowColor;
+ public String tableEvenRowColor;
}
}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css b/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css
index 3789c6a..eb02e85 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css
@@ -43,7 +43,9 @@
@eval textColor com.google.gerrit.client.Gerrit.getTheme().textColor;
@eval trimColor com.google.gerrit.client.Gerrit.getTheme().trimColor;
@eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
-
+@eval changeTableOutdatedColor com.google.gerrit.client.Gerrit.getTheme().changeTableOutdatedColor;
+@eval tableOddRowColor com.google.gerrit.client.Gerrit.getTheme().tableOddRowColor;
+@eval tableEvenRowColor com.google.gerrit.client.Gerrit.getTheme().tableEvenRowColor;
@sprite .greenCheckClass {
gwt-image: "greenCheck";
@@ -411,8 +413,16 @@
border-spacing: 0;
}
+.changeTable tr:nth-child\(even\) {
+ background: tableEvenRowColor;
+}
+
+.changeTable tr:nth-child\(odd\) {
+ background: tableOddRowColor;
+}
+
.changeTable .outdated {
- background: red;
+ background: changeTableOutdatedColor;
}
.changeTable .iconCell {
@@ -482,7 +492,6 @@
.accountDashboard.changeTable tr {
color: #444444;
- background: #F6F6F6;
}
.accountDashboard.changeTable tr a {
color: #444444;
@@ -492,13 +501,12 @@
.accountDashboard.changeTable .needsReview a {
font-weight: bold;
color: textColor;
- background: backgroundColor;
}
.changeTable .activeRow,
.accountDashboard.changeTable .activeRow,
.accountDashboard.changeTable .activeRow a {
- background: selectionColor;
+ background: selectionColor !important;
}
.changeTable .cID {
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/ThemeFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/ThemeFactory.java
index 68379d7..a2f4c99 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/ThemeFactory.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/ThemeFactory.java
@@ -43,6 +43,9 @@
theme.trimColor = color(name, "trimColor", "#D4E9A9");
theme.selectionColor = color(name, "selectionColor", "#FFFFCC");
theme.topMenuColor = color(name, "topMenuColor", theme.trimColor);
+ theme.changeTableOutdatedColor = color(name, "changeTableOutdatedColor", "#FF0000");
+ theme.tableOddRowColor = color(name, "tableOddRowColor", "transparent");
+ theme.tableEvenRowColor = color(name, "tableEvenRowColor", "transparent");
return theme;
}