]> git.parisson.com Git - pdf.js.git/commitdiff
progress bar matches new UI
authorArtur Adib <arturadib@gmail.com>
Wed, 25 Apr 2012 21:32:26 +0000 (17:32 -0400)
committerArtur Adib <arturadib@gmail.com>
Wed, 25 Apr 2012 21:32:26 +0000 (17:32 -0400)
web/viewer.css
web/viewer.js

index 74c1f4530a651b9d0e678a4d39ec6f3698336750..292b429a0b234dcced5b5da3fd0639c82b7a1660 100644 (file)
@@ -572,6 +572,8 @@ canvas {
 #loadingBox {
   margin: 100px 0;
   text-align: center;
+  color: #ddd;
+  font-size: 14px;
 }
 
 #loadingBar {
@@ -579,25 +581,25 @@ canvas {
   display: inline-block;
   border: 1px solid black;
   clear: both;
-  margin:0px;
+  margin: 0px;
+  margin-top: 5px;
   line-height: 0;
   border-radius: 4px;
-  width: 15em;
-  height: 1.5em;
+  width: 200px;
+  height: 25px;
 }
 
 #loadingBar .progress {
-  background-color: green;
   display: inline-block;
   float: left;
 
-  background: #b4e391;
-  background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%);
-  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391));
-  background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
-  background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
-  background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
-  background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);    
+  background: #666;
+  background: -moz-linear-gradient(top, #999 0%, #666 50%, #999 100%);
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999), color-stop(50%,#666), color-stop(100%,#999));
+  background: -webkit-linear-gradient(top, #999 0%,#666 50%,#999 100%);
+  background: -o-linear-gradient(top, #999 0%,#666 50%,#999 100%);
+  background: -ms-linear-gradient(top, #999 0%,#666 50%,#999 100%);
+  background: linear-gradient(top, #999 0%,#666 50%,#999 100%);    
 
   border-top-left-radius: 3px;
   border-bottom-left-radius: 3px;
@@ -606,6 +608,11 @@ canvas {
   height: 100%;
 }
 
+#loadingBar .progress.full {
+  border-top-right-radius: 3px;
+  border-bottom-right-radius: 3px;
+}
+
 .textLayer {
   position: absolute;
   left: 0;
index 99287a395b164d70172587f14ae5de8711fff223..fa9b6f72a5092be74ec490c4f1d49325c99a515a 100644 (file)
@@ -62,6 +62,9 @@ var ProgressBar = (function ProgressBarClosure() {
     updateBar: function ProgressBar_updateBar() {
       var progressSize = this.width * this._percent / 100;
 
+      if (this._percent > 95)
+        this.div.classList.add('full');
+
       this.div.style.width = progressSize + this.units;
     },