viewport

JavaFX ScrollPane programmatically moving the viewport - centering content

有些话、适合烂在心里 提交于 2019-12-19 03:24:35
问题 I can use the setVvalue(double) and setHvalue(double) methods to move a viewport in a JavaFX ScrollPane. What I'm struggling to do is center a particular node in the content of the scroll pane based on its position. I've tried all sorts of combos of localToScene() and boundsInParent(). I've read (a lot) and seen this example How to scroll to make a Node within the content of a ScrollPane visible? Which is close but doesn't center the objects just puts them visible. Having the built in mouse

Is there a bug in the new iOS 7.1 minimal-ui viewport setting?

跟風遠走 提交于 2019-12-18 12:32:49
问题 The new "minimal ui" setting in iOS 7.1 is great for landscape websites. My web app uses a fullscreen, absolute positioned div for its content, to give it an app-like feeling. But Safari seems to add just the height of the URL bar at the bottom. I have tried this on different iPhones, same result... Here is how it looks after the pages loaded: Is this a bug or something I am doing wrong or missing? Click for example (view on iPhone with iOS >= 7.1) 回答1: I had same problem with iPhone5+ios7.1

Why is the viewport tag on the Galaxy Nexus / Android 4 not working?

眉间皱痕 提交于 2019-12-18 11:27:03
问题 I'm working on a webApp that should resize to any screen size a device could have. On iOS and older android versions the viewport tag works fine. The picture on the screen is always resized to fit the screen. (Like described here: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW19) On the Galaxy Nexus (Android 4.0) it won't work. On the left and right side is about

Zoom and Pan in KineticJS

亡梦爱人 提交于 2019-12-18 10:53:39
问题 Is there a way one could zoom and pan on a canvas using KineticJS? I found this library kineticjs-viewport, but just wondering if there is any other way of achieving this because this library seems to be using so many extra libraries and am not sure which ones are absolutely necessary to get the job done. Alternatively, I am even open to the idea of drawing a rectangle around the region of interest and zooming into that one particular area. Any ideas on how to achieve this? A JSFiddle example

CSS: How can I adjust my font size fill all the space in a justified layout?

一曲冷凌霜 提交于 2019-12-18 09:46:12
问题 How can I make my text look like the image below using CSS? 回答1: First of all you need to use a mono-space font. You can find some pretty nice looking ones over at Google Fonts. The font in the image is Ubuntu Mono. Secondly, we are going to be using Viewport Width, or 'vw' unit (If you clicked the link, you'd see that it is well supported by browsers). You need to make sure the top line of text is the width you need it be to fit the width. This also means that each line needs to be it's own

Load mobile CSS if user is on Android

这一生的挚爱 提交于 2019-12-18 08:49:24
问题 My .htaccess file is writing a "smart" cookie. If my page reads this cookie it will write a div. Then my mobile CSS file loads only if the user's on an iPhone or iPod. My question is, how can I edit this code (below) to load the mobile CSS file if the user's on an Android? Here's my page and code: <meta name="viewport" content="width=device-width, user-scalable=yes" /> <link rel="stylesheet" type="text/css" href="css/mobile.css" media="only screen and (max-width: 640px)" /> <script type="text

how to set viewport so it is 380x800 or 800x380 depending on orientation?

↘锁芯ラ 提交于 2019-12-18 07:12:40
问题 The meta tag "viewport" lets me set up the initial scale for a website, but this can get weird if the user then flips the orientation of the device. For example, if I set the scale to be 800x380 and the user opens the website in portrait mode, this scale is obviously wrong, and when the user rotates 90deg, the website ends up being more like 1650 wide. How would I set a viewport such that if the device is landscape to begin with, it's 800x380, and if it's portrait to begin with, it's 380x800?

Qt开发经验小技巧61-70

核能气质少年 提交于 2019-12-18 00:03:25
很多人问Qt嵌入式平台用哪个好,这里统一回答(当前时间节点2018年):imx6+335x比较稳定,性能高就用RK3288 RK3399,便宜的话就用全志H3,玩一玩可以用树莓派香橙派。 对于大段的注释代码,建议用 #if 0 #endif 将代码块包含起来,而不是将该段代码选中然后全部 // ,下次要打开这段代码的话,又需要重新选中一次取消,如果采用的是 #if 0则只要把0改成1即可,效率大大提升。 Qt打包发布,有很多办法,Qt5以后提供了打包工具windeployqt(linux上为linuxdeployqt,mac上为macdeployqt)可以很方便的将应用程序打包,使用下来发现也不是万能的,有时候会多打包一些没有依赖的文件,有时候又会忘记打包一些插件尤其是用了qml的情况下,而且不能识别第三方库,比如程序依赖ffmpeg,则对应的库需要自行拷贝,终极大法就是将你的可执行文件复制到Qt安装目录下的bin目录,然后整个一起打包,挨个删除不大可能依赖的组件,直到删到正常运行为止。 Qt中的动画,底层用的是QElapsedTimer定时器来完成处理,比如产生一些指定规则算法的数据,然后对属性进行处理。 在绘制无背景颜色只有边框颜色的圆形时候,可以用绘制360度的圆弧替代,效果完全一致。 QRect rect(-radius, -radius, radius * 2,

The values of meta viewport attribute are not reflected when in full screen mode in android chrome browser

我们两清 提交于 2019-12-17 19:30:43
问题 When I am in full screen mode in android using fullscreen api, the values of meta viewport attribute like initial-scale and user-scalable are not reflected in the browser. If I am not in full screen mode, the values of meta viewport are reflected. You can check it by accessing MDN:Fullscreen api example from a mobile browser I don’t find any source saying meta viewport will be disabled in fullscreen in android. So am I making any mistake or no one has documented it? Also pinch and zoom is

Responsive site is zoomed in when flipping between Portrait and Landscape on iPad/iPhone

回眸只為那壹抹淺笑 提交于 2019-12-17 17:35:39
问题 I've built a responsive site using Twitter Bootstrap here: http://zarin.me/cce/ The responsive design works great on iPad and iPhone, however when I flip the device from portrait to landscape, the site is zoomed in instead of adapting to the screen (pinching the screen works). What am I missing? Is this a viewport issue? Here's the only viewport code I have in my : <meta content="width=device-width, initial-scale=1.0" name="viewport"> Thanks in advance! 回答1: You also want to add the maximum