Add more theme color options
Porting work from OpenStack Gerrit. * Adds a theme option to change outdated background color, the default is too harsh for some themes. * Adds odd/even row background color for tables such as list of open reviews. This makes them more visible without clicking on them. Change-Id: I86ad9bba0f6cfffb267dd2631cc718c5c10e848a
This commit is contained in:

committed by
Andrew Hutchings

parent
8bacce19bc
commit
cfd7abbf5b
@@ -2237,6 +2237,31 @@ code, or standard color name.
|
|||||||
+
|
+
|
||||||
By default a shade of yellow, `FFFFCC`.
|
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
|
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
|
by using the "signed-in" and "signed-out" theme sections. Variables
|
||||||
not specified in a section are inherited from the default theme.
|
not specified in a section are inherited from the default theme.
|
||||||
|
@@ -31,5 +31,8 @@ public class HostPageData {
|
|||||||
public String textColor;
|
public String textColor;
|
||||||
public String trimColor;
|
public String trimColor;
|
||||||
public String selectionColor;
|
public String selectionColor;
|
||||||
|
public String changeTableOutdatedColor;
|
||||||
|
public String tableOddRowColor;
|
||||||
|
public String tableEvenRowColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,9 @@
|
|||||||
@eval textColor com.google.gerrit.client.Gerrit.getTheme().textColor;
|
@eval textColor com.google.gerrit.client.Gerrit.getTheme().textColor;
|
||||||
@eval trimColor com.google.gerrit.client.Gerrit.getTheme().trimColor;
|
@eval trimColor com.google.gerrit.client.Gerrit.getTheme().trimColor;
|
||||||
@eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
|
@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 {
|
@sprite .greenCheckClass {
|
||||||
gwt-image: "greenCheck";
|
gwt-image: "greenCheck";
|
||||||
@@ -411,8 +413,16 @@
|
|||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.changeTable tr:nth-child\(even\) {
|
||||||
|
background: tableEvenRowColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
.changeTable tr:nth-child\(odd\) {
|
||||||
|
background: tableOddRowColor;
|
||||||
|
}
|
||||||
|
|
||||||
.changeTable .outdated {
|
.changeTable .outdated {
|
||||||
background: red;
|
background: changeTableOutdatedColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.changeTable .iconCell {
|
.changeTable .iconCell {
|
||||||
@@ -482,7 +492,6 @@
|
|||||||
|
|
||||||
.accountDashboard.changeTable tr {
|
.accountDashboard.changeTable tr {
|
||||||
color: #444444;
|
color: #444444;
|
||||||
background: #F6F6F6;
|
|
||||||
}
|
}
|
||||||
.accountDashboard.changeTable tr a {
|
.accountDashboard.changeTable tr a {
|
||||||
color: #444444;
|
color: #444444;
|
||||||
@@ -492,13 +501,12 @@
|
|||||||
.accountDashboard.changeTable .needsReview a {
|
.accountDashboard.changeTable .needsReview a {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: textColor;
|
color: textColor;
|
||||||
background: backgroundColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.changeTable .activeRow,
|
.changeTable .activeRow,
|
||||||
.accountDashboard.changeTable .activeRow,
|
.accountDashboard.changeTable .activeRow,
|
||||||
.accountDashboard.changeTable .activeRow a {
|
.accountDashboard.changeTable .activeRow a {
|
||||||
background: selectionColor;
|
background: selectionColor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.changeTable .cID {
|
.changeTable .cID {
|
||||||
|
@@ -43,6 +43,9 @@ class ThemeFactory {
|
|||||||
theme.trimColor = color(name, "trimColor", "#D4E9A9");
|
theme.trimColor = color(name, "trimColor", "#D4E9A9");
|
||||||
theme.selectionColor = color(name, "selectionColor", "#FFFFCC");
|
theme.selectionColor = color(name, "selectionColor", "#FFFFCC");
|
||||||
theme.topMenuColor = color(name, "topMenuColor", theme.trimColor);
|
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;
|
return theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user