Skip to content

Commit

Permalink
updates and additions
Browse files Browse the repository at this point in the history
  • Loading branch information
www-data committed Feb 20, 2012
1 parent 0f5b274 commit fa30c45
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 28 deletions.
49 changes: 21 additions & 28 deletions browser/browser-add-scrollbars-to-the-browser.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
diff --git a/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js b/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
index 388cffc..9fa3b41 100644
index 388cffc..9a345db 100644
--- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
+++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
@@ -1937,8 +1937,79 @@ PageAssistant.prototype.moved = function(scrollState) {
@@ -1937,8 +1937,75 @@ PageAssistant.prototype.moved = function(scrollState) {
// on and elements attributes already exists it automagically
// gets cancelled.
var pos = this.controller.getSceneScroller().mojo.getScrollPosition();
+ if (pos.left > 0) {
+ var car = this.controller.get("scrollbar-x-car");
+ var car_bord = this.controller.get("scrollbar-x-car-bord");
+ var car = this.controller.get("scrollbar-x");
+ var winWidth = this.controller.window.innerWidth;
+ var scrollWidth = this.controller.getSceneScroller().scrollWidth;
+ var zoneWidth = winWidth - 33;
Expand All @@ -18,34 +17,32 @@ index 388cffc..9fa3b41 100644
+ window.clearTimeout(this.scrollbarXFader3);
+
+ var scrollerFade2 = function(){
+ this.controller.get("scrollbar-x-car-bord").setOpacity(0.5);
+ this.controller.get("scrollbar-x").setOpacity(0.5);
+ };
+ var scrollerFade3 = function(){
+ this.controller.get("scrollbar-x-car-bord").setOpacity(0.3);
+ this.controller.get("scrollbar-x").setOpacity(0.3);
+ };
+ var scrollerHide = function(){
+ this.controller.get("scrollbar-x-car-bord").setOpacity(0.0);
+ this.controller.get("scrollbar-x").setOpacity(0.0);
+ };
+
+ var mWidth = winWidth * winWidth / scrollWidth;
+ var carWidth = Math.max(mWidth, 24);
+ var leftPercent = (Math.abs(pos.left) / scrollWidth) * 100;
+ carWidth = Math.min(carWidth, (zoneWidth - (zoneWidth * (leftPercent / 100))));
+
+ car_bord.style.width = carWidth + "px";
+ car_bord.style.left = (leftPercent / 100 * zoneWidth) + 17 + "px";
+ car.style.width = carWidth - 2 + "px";
+ car.style.width = carWidth + "px";
+ car.style.left = (leftPercent / 100 * zoneWidth) + 17 + "px";
+
+ this.scrollbarXFader2 = window.setTimeout(scrollerFade2.bind(this), 500);
+ this.scrollbarXFader3 = window.setTimeout(scrollerFade3.bind(this), 550);
+ this.scrollbarXHide = window.setTimeout(scrollerHide.bind(this), 600);
+
+ car_bord.setOpacity(0.7);
+ car.setOpacity(0.7);
+ }
if (pos.top > 0) {

+ var car = this.controller.get("scrollbar-y-car");
+ var car_bord = this.controller.get("scrollbar-y-car-bord");
+ var car = this.controller.get("scrollbar-y");
+ var winHeight = this.controller.window.innerHeight;
+ var scrollHeight = this.controller.getSceneScroller().scrollHeight;
+ var zoneHeight = winHeight - 33;
Expand All @@ -55,47 +52,43 @@ index 388cffc..9fa3b41 100644
+ window.clearTimeout(this.scrollbarYFader3);
+
+ var scrollerFade2 = function(){
+ this.controller.get("scrollbar-y-car-bord").setOpacity(0.5);
+ this.controller.get("scrollbar-y").setOpacity(0.5);
+ };
+ var scrollerFade3 = function(){
+ this.controller.get("scrollbar-y-car-bord").setOpacity(0.3);
+ this.controller.get("scrollbar-y").setOpacity(0.3);
+ };
+ var scrollerHide = function(){
+ this.controller.get("scrollbar-y-car-bord").setOpacity(0.0);
+ this.controller.get("scrollbar-y").setOpacity(0.0);
+ };
+
+ var mHeight = winHeight * winHeight / scrollHeight;
+ var carHeight = Math.max(mHeight, 24);
+ var topPercent = (Math.abs(pos.top) / scrollHeight) * 100;
+ carHeight = Math.min(carHeight, (zoneHeight - (zoneHeight * (topPercent / 100))));
+
+ car_bord.style.height = carHeight + "px";
+ car_bord.style.top = (topPercent / 100 * zoneHeight) + 17 + "px";
+ car.style.height = carHeight - 2 + "px";
+ car.style.height = carHeight + "px";
+ car.style.top = (topPercent / 100 * zoneHeight) + 17 + "px";
+
+ this.scrollbarYFader2 = window.setTimeout(scrollerFade2.bind(this), 500);
+ this.scrollbarYFader3 = window.setTimeout(scrollerFade3.bind(this), 550);
+ this.scrollbarYHide = window.setTimeout(scrollerHide.bind(this), 600);
+
+ car_bord.setOpacity(0.7);
+ car.setOpacity(0.7);
+
// We have moved the scene above (0,0) BUT we only hide the
// URL bar IF if doesn't have focus.
if (!this._addressBar.hasFocus()) {
diff --git a/usr/palm/applications/com.palm.app.browser/app/views/page/page-scene.html b/usr/palm/applications/com.palm.app.browser/app/views/page/page-scene.html
index d7ab020..76a1a23 100644
index d7ab020..c869bef 100644
--- a/usr/palm/applications/com.palm.app.browser/app/views/page/page-scene.html
+++ b/usr/palm/applications/com.palm.app.browser/app/views/page/page-scene.html
@@ -1,6 +1,12 @@
@@ -1,6 +1,9 @@
<div id="view_menu_bkgnd">
<div id="view_menu_bkgnd_content_nochrome"></div>
</div>
+<div id="scrollbar-y-car-bord" style="position: fixed; z-index: 999; background-color: white; width: 7px; height: 26px; top: 0%; right: 1px; -webkit-border-radius: 2px; opacity: 0.0;">
+ <div id="scrollbar-y-car" style="position: absolute; z-index: 1000; background-color: #2e2e2e; width: 5px; height: 24px; top: 1px; left: 1px; -webkit-border-radius: 2px;"></div>
+</div>
+<div id="scrollbar-x-car-bord" style="position: fixed; z-index: 999; background-color: white; width: 26px; height: 7px; bottom: 1px; left: 0%; -webkit-border-radius: 2px; opacity: 0.0;">
+ <div id="scrollbar-x-car" style="position: absolute; z-index: 1000; background-color: #2e2e2e; width: 24px; height: 5px; bottom: 1px; left: 1px; -webkit-border-radius: 2px;"></div>
+</div>
+
+<div id="scrollbar-y" style="position: fixed; z-index: 1000; background-color: #2e2e2e; width: 5px; height: 24px; top: 17px; right: 2px; -webkit-border-radius: 2px; border-style: solid; border-color: white; border-width: 1px; opacity: 0.0"></div>
+<div id="scrollbar-x" style="position: fixed; z-index: 1000; background-color: #2e2e2e; width: 24px; height: 5px; bottom: 2px; left: 17px; -webkit-border-radius: 2px; 2px; border-style: solid; border-color: white; border-width: 1px; opacity: 0.0"></div>

<div id='web_view_panel' style="min-height:481px;">
<div id="web_view" x-mojo-element="WebView"></div>
16 changes: 16 additions & 0 deletions messaging/messaging-google-talk-login-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/etc/dnsmasq.palm.conf b/etc/dnsmasq.palm.conf
index 47b7908..4bebd01 100644
--- a/etc/dnsmasq.palm.conf
+++ b/etc/dnsmasq.palm.conf
@@ -286,5 +286,11 @@ interface=bridge0
# dnsmasq.
#log-queries

+#use the public google dns servers to resolve the domains gmail.com and googlemail.com.
+server=/gmail.com/8.8.8.8
+server=/gmail.com/8.8.4.4
+server=/googlemail.com/8.8.8.8
+server=/googlemail.com/8.8.4.4
+
# Include a another lot of configuration options.
conf-file=/tmp/pmnetconfig/dnsmasq.server.conf
134 changes: 134 additions & 0 deletions top-bar/top-bar-battery-percent-and-horizontal-icon.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
index 48c4681..b10901c 100644
--- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
+++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
@@ -2070,7 +2070,9 @@ handlePowerNotifications: function(payload) {
// Show the battery level if not charging
if (!this.isCharging) {
Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging + " Battery level "+ i);
- Mojo.Dom.get('power').className = 'battery-' + i;
+ var powerEl = Mojo.Dom.get('power');
+ powerEl.className = 'battery-' + i;
+ powerEl.innerHTML = '<div style="-webkit-transform: rotate(90deg); position: absolute; right: -10px; bottom: -3px; text-align: right; font-size: 10px">' + payload.percent_ui + '%</div>'

//Show Banner Message if the Battery level is below 20%
var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);
@@ -2104,10 +2106,14 @@ handlePowerNotifications: function(payload) {
}
else {
Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
+ var powerEl = Mojo.Dom.get('power');
if(payload.percent_ui == 100)
- Mojo.Dom.get('power').className = 'battery-charged';
- else
- Mojo.Dom.get('power').className = 'battery-charging-' + i;
+ powerEl.className = 'battery-charged';
+ powerEl.innerHTML = '';
+ else {
+ powerEl.className = 'battery-charging-' + i;
+ powerEl.innerHTML = '<div style="-webkit-transform: rotate(90deg); position: absolute; right: -11px; bottom: -3px; text-align: right; font-size: 10px">' + payload.percent_ui + '%</div>'
+ }

}

@@ -2152,10 +2158,14 @@ handlePowerNotifications: function(payload) {

if (this.isCharging) {
Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
+ var powerEl = Mojo.Dom.get('power');
if(this.batteryLevel == 100)
- Mojo.Dom.get('power').className = 'battery-charged';
- else
- Mojo.Dom.get('power').className = 'battery-charging-' + this.lastBatteryLevel;
+ powerEl.className = 'battery-charged';
+ powerEl.innerHTML = '';
+ else {
+ powerEl.className = 'battery-charging-' + this.lastBatteryLevel;
+ powerEl.innerHTML = '<div style="-webkit-transform: rotate(90deg); position: absolute; right: -11px; bottom: -3px; text-align: right; font-size: 10px">' + payload.percent_ui + '%</div>'
+ }

var stageController = Mojo.Controller.getAppController().getStageController("LowBatteryAlert");
if (stageController) {
@@ -2179,7 +2189,9 @@ handlePowerNotifications: function(payload) {
else {
this.chargingBannerShown = false;
Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
- Mojo.Dom.get('power').className = 'battery-' + this.lastBatteryLevel;
+ var powerEl = Mojo.Dom.get('power')
+ powerEl.className = 'battery-' + this.lastBatteryLevel;
+ powerEl.innerHTML = '<div style="-webkit-transform: rotate(90deg); position: absolute; right: -10px; bottom: -3px; text-align: right; font-size: 10px">' + payload.percent_ui + '%</div>'
Mojo.Controller.getAppController().removeBanner('chargingAlert');
if (this.batteryLevel < this.minBatThresholdForUpdate) {
Mojo.Log.info("SystemUI - OTA - Closing All Update Alerts due to battery level dropped below threshold level and charger disconnected.");
diff --git a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
index a1cafa2..448bc72 100644
--- a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
+++ b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
@@ -142,36 +142,37 @@ body.palm-default {
}

#power {
- margin-left: 2px;
- width: 17px;
-}
-
-#power.error { background-image: url(../images/battery-error.png); }
-#power.battery-0 { background-image: url(../images/battery-0.png); }
-#power.battery-1 { background-image: url(../images/battery-1.png); }
-#power.battery-2 { background-image: url(../images/battery-2.png); }
-#power.battery-3 { background-image: url(../images/battery-3.png); }
-#power.battery-4 { background-image: url(../images/battery-4.png); }
-#power.battery-5 { background-image: url(../images/battery-5.png); }
-#power.battery-6 { background-image: url(../images/battery-6.png); }
-#power.battery-7 { background-image: url(../images/battery-7.png); }
-#power.battery-8 { background-image: url(../images/battery-8.png); }
-#power.battery-9 { background-image: url(../images/battery-9.png); }
-#power.battery-10 { background-image: url(../images/battery-10.png); }
-#power.battery-11 { background-image: url(../images/battery-11.png); }
-
-#power.battery-charging-0 { background-image: url(../images/battery-charging-0.png); }
-#power.battery-charging-1 { background-image: url(../images/battery-charging-1.png); }
-#power.battery-charging-2 { background-image: url(../images/battery-charging-2.png); }
-#power.battery-charging-3 { background-image: url(../images/battery-charging-3.png); }
-#power.battery-charging-4 { background-image: url(../images/battery-charging-4.png); }
-#power.battery-charging-5 { background-image: url(../images/battery-charging-5.png); }
-#power.battery-charging-6 { background-image: url(../images/battery-charging-6.png); }
-#power.battery-charging-7 { background-image: url(../images/battery-charging-7.png); }
-#power.battery-charging-8 { background-image: url(../images/battery-charging-8.png); }
-#power.battery-charging-9 { background-image: url(../images/battery-charging-9.png); }
-#power.battery-charging-10 { background-image: url(../images/battery-charging-10.png); }
-#power.battery-charging-11 { background-image: url(../images/battery-charging-11.png); }
+ margin-left: 3px;
+ margin-right: 2px;
+ width: 20px;
+}
+
+#power.error { background-image: url(../images/battery-error.png); width: 17px }
+#power.battery-0 { background-image: url(../images/battery-0.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-1 { background-image: url(../images/battery-1.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-2 { background-image: url(../images/battery-2.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-3 { background-image: url(../images/battery-3.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-4 { background-image: url(../images/battery-4.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-5 { background-image: url(../images/battery-5.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-6 { background-image: url(../images/battery-6.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-7 { background-image: url(../images/battery-7.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-8 { background-image: url(../images/battery-8.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-9 { background-image: url(../images/battery-9.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-10 { background-image: url(../images/battery-10.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+#power.battery-11 { background-image: url(../images/battery-11.png); -webkit-transform: rotate(-90deg); margin-top: 9px; }
+
+#power.battery-charging-0 { background-image: url(../images/battery-charging-0.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-1 { background-image: url(../images/battery-charging-1.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-2 { background-image: url(../images/battery-charging-2.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-3 { background-image: url(../images/battery-charging-3.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-4 { background-image: url(../images/battery-charging-4.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-5 { background-image: url(../images/battery-charging-5.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-6 { background-image: url(../images/battery-charging-6.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-7 { background-image: url(../images/battery-charging-7.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-8 { background-image: url(../images/battery-charging-8.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-9 { background-image: url(../images/battery-charging-9.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-10 { background-image: url(../images/battery-charging-10.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
+#power.battery-charging-11 { background-image: url(../images/battery-charging-11.png); -webkit-transform: rotate(-90deg); margin-top: 10px; }
#power.battery-charged { background-image: url(../images/battery-charged.png); }

#rssi {

0 comments on commit fa30c45

Please sign in to comment.