11/21/2011, 06:48 PM
|
#1 (permalink) |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
12/11/11: I made some performance and cosmetic improvements to the patch.
EDIT: Rod didn't answer, so I checked it myself. Apparently, the patch build server changed the patch code for some reason and made it useless. I've resubmitted the patch and I hope that everything would work after the approval. Update: Approved and now in Preware. Get it there. Update: Border added to make the indicators more visible on a black background (BTW, if anyone knows why it is taking so long to get the patch approved in Preware, please let me know). Update: Fixed bug that caused the horizontal scrollbar to show incorrect position. As you probably know, one of the most annoying issues with the beautiful webOS browser is the lack of scrollbars. There are two browser scrollbars patches in Preware (TIWizard's and veerar's). However, I found them both not very convenient and not really useful, so I decided to develop my own patch that adds scrollbars that looks like iOS' scrollbars. Here are some screenshots. As you can see, there are wide and half transparent "indicators" which helps figuring out quickly where you are in the page. It works perfectly in both portrait and landscape mode. I've already submitted this patch to Preware, so expect it to appear in the patches feed in the coming days. It's fully compatible with 2.1, 2.2 and 2.2.3. I didn't check earlier versions. ![]()
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
Last edited by isagar2004; 12/16/2011 at 02:31 AM. Reason: 2.2.0-94 (Pre3) update notice. |
11/22/2011, 01:54 AM
|
#4 (permalink) | |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
There's always a possibility. However, since I don't own a TouchPad and because I'm not familiar with enyo, it'll take time.
Quote:
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
|
|
11/22/2011, 02:22 AM
|
#5 (permalink) |
|
Member
![]() ![]() Join Date: Feb 2007
Location: Minsk, Belarus
Posts: 598
Likes Received: 18
Thanks: 106
Thanked 203 Times in 63 Posts
|
isagar2004, maybe you could take a look and make a global patch for all Mojo.Scroller controls so we have these things everywhere
![]() Great work so far!
__________________
Amigo Music Player Tractor - Archive Extractor Sync Palm Pre with iTunes ryhor.com - find cool apps for the Treo and Palm |
11/22/2011, 07:43 AM
|
#6 (permalink) | |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
Quote:
It's not so easy as it might sound, but I'll take a look and see what I can do.
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
|
|
11/22/2011, 05:32 PM
|
#8 (permalink) | |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
Quote:
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
Last edited by isagar2004; 11/24/2011 at 05:18 PM. |
|
11/22/2011, 06:57 PM
|
#9 (permalink) |
|
Member
![]() Join Date: Aug 2011
Posts: 1,923
Likes Received: 205
Thanks: 21
Thanked 196 Times in 143 Posts
|
A potential problem in patching Enyo, is that many apps use the VirtualList control, which basically only keeps in existence at any given time a handful of entries other than what is visible, so it might be really hard to determine where the end of something is.
__________________
GVoice for all webOS devices - for PlayBook - GVoiceA for Android XO - The Subsonic Media Commander - webOS Demo and Full version and PlayBook full version available - Ask500, the webOS polling app ![]() (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender |
11/22/2011, 08:03 PM
|
#10 (permalink) | ||
|
Member
![]() Join Date: Nov 2011
Posts: 26
Likes Received: 5
Thanks: 1
Thanked 5 Times in 2 Posts
|
Quote:
Quote:
|
||
11/22/2011, 09:05 PM
|
#11 (permalink) |
|
Member
![]() Join Date: Jun 2009
Location: Portland, OR
Posts: 469
Likes Received: 22
Thanks: 186
Thanked 110 Times in 80 Posts
|
Graphically this type of patch is certainly possible on a Touchpad. However, that's where it ends, we still have no way to get any information from enyo about the current scroll position. It's my opinion, when it comes to the web browser on the touchpad, a patch that does anything at all "scrolling related" is NOT HAPPENING UNLESS HP OPENS UP THE COMPILED BITS
Myself and others have already spent many hours trying different techniques to modify scrolling within the browser. The compiled part, "the browser adapter" is the road block. There is no way to get any information from the browser adapter regarding the current scroll position and also no enyo method to tell the browser window where to scroll to. Mojo has that stuff, enyo does not. Now if anyone manages to figure out some magic, please PM me. I'm highly interested in adding various scrolling options to my patch "Custom Browser Gestures". |
11/23/2011, 12:51 AM
|
#12 (permalink) |
|
Member
![]() Join Date: Aug 2011
Posts: 1,923
Likes Received: 205
Thanks: 21
Thanked 196 Times in 143 Posts
|
I'd think it would be more valuable to spend one's time poking at the javascript stuff we can see (Enyo) rather than the compiled binaries, that it takes very special skills to be able to patch with any effectiveness whatsoever.
__________________
GVoice for all webOS devices - for PlayBook - GVoiceA for Android XO - The Subsonic Media Commander - webOS Demo and Full version and PlayBook full version available - Ask500, the webOS polling app ![]() (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender |
11/23/2011, 04:58 AM
|
#13 (permalink) | ||
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
Quote:
Quote:
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
Last edited by isagar2004; 11/23/2011 at 07:52 AM. |
||
11/23/2011, 03:30 PM
|
#15 (permalink) | |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
Quote:
Can you share more details? How exactly did you manage to get the scroll position?
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
|
|
11/23/2011, 04:43 PM
|
#16 (permalink) | |
|
Member
![]() Join Date: Nov 2011
Posts: 26
Likes Received: 5
Thanks: 1
Thanked 5 Times in 2 Posts
|
Quote:
![]() As some of you might already have discovered, the WebView control has an undocumented event named "onScrolledTo"*. That event is fired with the x and y scroll positions whenever the browser is scrolled. If you, in browser.js, add an event to the Webview control, e.g.: Code:
(...)
{name: "view", kind: "WebView", flex: 1, height: "100%",
onScrolledTo: "scrolledTo",
onMousehold: "openContextMenu",
onPageTitleChanged: "pageTitleChanged",
(...)
Code:
scrolledTo : function (inSender, inX, inY) {
(...)
}
This leaves two other tasks, a simple and a hard one, to build a proper scrollbar (at least as an indicator): a) retrieving the current viewport size (i.e., the size of the visible area on screen). This should be rather easy with an enyo.calcModalControlBounds() call. I haven't tried this yet tho. b) is a bit harder: retrieving the dimensions of the current page size (factoring in the page zoom) FWIW, I tried retrofitting SimpleWebView.js and WebView.js with the pageDimensionsChanged callback handler and feed it into an event, but it doesn't even seem to fire. Maybe I'm barking up the wrong tree here and there's a simple way to get the page dimensions. Cheers Freddy P.S. / Edit: To have a look at what's going on, you can abuse the address bar as an output device: Code:
scrolledTo : function (inSender, inX, inY) {
this.$.addressbar.setUrl("scroll position: " + inX + "/" + inY);
}
Last edited by d12r; 11/23/2011 at 05:16 PM. Reason: P.S. |
|
11/23/2011, 05:29 PM
|
#17 (permalink) | |
|
Member
![]() Join Date: Nov 2011
Posts: 26
Likes Received: 5
Thanks: 1
Thanked 5 Times in 2 Posts
|
To quote myself:
Quote:
Code:
scrolledTo : function (inSender, inX, inY) {
var v = enyo.calcModalControlBounds(inSender);
}
Now we're left with retrieving the current page dimensions and we can have ourselves a scroll indicator. |
|
11/23/2011, 06:53 PM
|
#18 (permalink) | |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
Quote:
Also, did you try using enyo.fetchControlSize(inSender) to get the page dimensions?
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
Last edited by isagar2004; 11/23/2011 at 06:59 PM. |
|
11/23/2011, 07:52 PM
|
#19 (permalink) | ||
|
Member
![]() Join Date: Nov 2011
Posts: 26
Likes Received: 5
Thanks: 1
Thanked 5 Times in 2 Posts
|
Quote:
Quote:
Last edited by d12r; 11/23/2011 at 08:00 PM. |
||
11/23/2011, 09:20 PM
|
#20 (permalink) |
|
Member
![]() Join Date: Jun 2011
Posts: 241
Likes Received: 61
Thanks: 1
Thanked 167 Times in 66 Posts
|
Not sure what is that, but try using Tellurium.getDimensions(inSender), it returns width and height values that are not calculated through clientWidth or offsetWidth. It might be it, or might be just the same thing.
__________________
TouchPad vKBD patches with working arrow keys iOS-like browser scrollbars for webOS 2.x Disable video pause when minimized for webOS 2.2.x [Ongoing Project] webOS Scrollbars Like my work? Want to support it? Want to thank me?
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



