electron frameless window auto maximize when drag to the top (windows 7) - electron

a normal program, when mouse click and drag windows topbar to the top of screen, this program will auto fullscreen in windows 7+ system
but when I use electron without the frame, and use electron-drag package to control move it, then, what can I do, to let it auto fullscreen when drag to top, and drag left side cover left screen, drag right side...
thanks

electron-drag hasn't been updated for 2 years.
Why not just use electrons built in drag-able style <div style="-webkit-app-region: drag"> I Built a quick app, and added the style to a div, worked fine.
https://electronjs.org/docs/api/frameless-window#draggable-region
Note: -webkit-app-region: drag is known to have problems while the developer tools are open.
See this GitHub issue for more information including a workaround.
EDIT:
create a quick gist showing how to mimic the snapping of a frameless window without using the draggable style. https://gist.github.com/flapjack17/44a9fdd504b832714c24f899a11c0b42

Related

Facebook-style CSS sliding panel doesn't scroll on iOS

I created a mobile version of my website, testing along the way on my Nexus 5. After testing on iOS 7 (on an iPhone4 and iPhone5S), seems like scrolling on the side menu is broken.
Here's a live demo (no links work, and you'll see a huge CSS & JS file, since it's for the whole app): http://www.altertecnia.com/menu/
Click on the top left icon, and the menu is displayed. Now, on desktop and Android, I can scroll the whole page (including the menu) just fine, and click on the right side of the menu to close it. But on iOS7, when I try to do that, only the background (content of the page) scrolls, not the menu.
Any ideas what could be causing this?

Missing vertical scrollbar in web browser for vaadin 6.8.12

I have recently built a new Vaadin widgetset for our web application. The new widgetset is based on some new addons but especially on vaadin 6.8.12.
When I deploy the ear file and start the application the right vertical scrollbar that belongs to the web browser (not a java panel or layout) is missing. The scrollbar is actually there but you are forced to drag the browser window far to the right in order to make it visible. Even though it is visible you can not scroll down as much as you need to view the lower content of the page.
This is a problem in Chrome, Firefox and Opera but for some reason Interner explorer seems to handle it just fine.
So what I want is that the browser scrollbar should be visible regardless of the size of the window.
Any ideas?
The height of a layout must be undefined for the vertical scrollbar to show up. If you set it to 100%, any content off the bottom of your browser window / tab will be hidden.
If that's not enough, please add some code to see how you made your main window layout.

jQuery Mobile panel smooth scrolling

This is not a question about JQM panels scrolling independently of the page, though that is an issue I've had trouble with and almost overcome, this is about making the panel scroll smoothly and ignore the device browser's edge event (or whatever the correct term is, I'll explain below).
Basically, I'm trying to replicate the menu on Google's mobile site, which naturally isn't using JQM like us common folk. I've got it pretty close, but the scrolling animation is very rigid. I need it be momentum-based rather than fixed to your finger.
Also, when you reach the top or bottom of the menu, it's considered the extremes of the document so the browser moves the whole document up or down to indicate the edge of the page. Instead, the page should never move while the panel is open and the menu should take on this behaviour within the panel.
Since I've set the panel height to 100%, this forces the address bar on iOS Safari to come down when the menu is open. This seems to be exactly what happens on Google, but if there's a way around this I'd love to hear it.
Finally, one downside of the way I've emulated independent scrolling is to just set the content wrap as fixed when the panel is open. However, this means the page always scrolls to the top when the panel opens. Any alternatives for this would be appreciated. I suppose I could just set the page top as scrollTop or something.
To summarise:
Panel menu needs to scroll smoothly (momentum rather than direct touch)
Elastic edge on menu rather than window
iOS Safari address bar interfering with height
Page fixed at top when panel open
If any of my descriptions don't make sense, just visit google.com on your phone and check out their menu.
ScrollFix seems to have solved all my issues.

Delphi: Right aligned panel flickers upon resizing form

it should be simple but I don't find how to do it.
I create a form with a right aligned panel that I color in blue for example.
If I grab my forms left edge and resize it back and forth horizontally quickly, I would like the right panel not to move or flicker. As its position is unchanged, there is no reason why it should not stay completely steady. Does anybody know a simple trick to solve this apparently simple problem?
Thanks
This is just a fact of life with Windows GUI apps. You can see the same effect in a WinForms app and indeed even in mainstream Windows apps. For example, open an Explorer window and do exactly the same operation, resize by grabbing the left hand edge of the window. You will see exactly the same effect. You can see the same effect by resizing from any edge. Word and Excel behave in the same way.
My guess is that Windows repaints in the sizing loop before it sends the resizing message that allows the app to realign its controls.

Cannot launch library from interface builder

I have xcode 4 and I see no way of launching library from IB. So I cannot add image buttons to my app. apple-shift-L didnt work and I dont see a tools menu option.
Anyway around this?
Can I programmatically add buttons?
The library in Xcode 4 is tricky to find and occasionally hidden.
In IB mode, make sure the right drawer is open, then look at the very bottom of it. There should be a small area containing the Library. If not, there should be 4 buttons at the very bottom of the right drawer. In order: "Piece of Paper", "Brackets", "Box", "Movie". Click the box to open the Library. Then drag to resize it to a humane height.
They moved it to View->Utilities->Object Library

Resources