Skip to content

Commit

Permalink
Merge pull request #13 from GwtMaterialDesign/release_2.0
Browse files Browse the repository at this point in the history
Release 2.0-rc3
  • Loading branch information
kevzlou7979 authored Nov 29, 2016
2 parents baeb390 + 5fa1027 commit 34f1293
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gwt Material Design Themes for https://github.com/GwtMaterialDesign/gwt-material
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-themes</artifactId>
<version>2.0-rc2</version>
<version>2.0-rc3</version>
</dependency>
```

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<parent>
<artifactId>gwt-material-parent</artifactId>
<groupId>com.github.gwtmaterialdesign</groupId>
<version>2.0-rc2</version>
<version>2.0-rc3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>gwt-material-themes</artifactId>
<version>2.0-rc2</version>
<version>2.0-rc3</version>

<name>Gwt Material Themes</name>
<description>Themes for gwt-material</description>
Expand All @@ -23,7 +23,7 @@
<connection>scm:git:git@github.com:GwtMaterialDesign/gwt-material-themes.git</connection>
<developerConnection>scm:git:git@github.com:GwtMaterialDesign/gwt-material-themes.git</developerConnection>
<url>http://github.com/GwtMaterialDesign/gwt-material-themes</url>
<tag>v2.0-rc2</tag>
<tag>v2.0-rc3</tag>
</scm>

<licenses>
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/gwt/material/design/themes/client/ThemeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
import com.google.gwt.dom.client.StyleElement;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.StyleInjector;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.TextResource;
Expand Down Expand Up @@ -54,7 +54,7 @@ public interface ThemeBundle extends ClientBundle {
TextResource overrides();
}

private static List<StyleElement> styleElements;
private static List<Element> elements;

/**
* Load a provided {@link ThemeBundle} asynchronously.
Expand All @@ -67,19 +67,19 @@ public static void loadAsync(final ThemeBundle bundle, final ThemeAsyncCallback
@Override
public void onSuccess() {
if(bundle != null) {
if(styleElements == null) {
styleElements = new ArrayList<>();
if(elements == null) {
elements = new ArrayList<>();
} else {
unload();
}

// More resources might be loaded in the future.
styleElements.add(StyleInjector.injectStylesheet(bundle.style().getText()));
styleElements.add(StyleInjector.injectStylesheet(bundle.overrides().getText()));
elements.add(StyleInjector.injectStylesheet(bundle.style().getText()));
elements.add(StyleInjector.injectStylesheet(bundle.overrides().getText()));
}

if(callback != null) {
callback.onSuccess(styleElements.size());
callback.onSuccess(elements.size());
}
}
@Override
Expand All @@ -95,11 +95,11 @@ public void onFailure(Throwable reason) {
* Unload the current loaded theme.
*/
public static void unload() {
if(styleElements != null) {
for (StyleElement style : styleElements) {
if(elements != null) {
for (Element style : elements) {
style.removeFromParent();
}
styleElements.clear();
elements.clear();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #ffc107 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #2196f3 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #795548 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #4caf50 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #9e9e9e !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #ff9800 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #e91e63 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #9c27b0 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #f44336 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ blockquote {
}

/** Window **/
.window-overlay .window .window-toolbar {
.window .window-toolbar {
background-color: #ffeb3b !important;
}

Expand Down

0 comments on commit 34f1293

Please sign in to comment.