android,css,internet-explorer-9,fluid-layout,aspect-ratio
I might be misunderstanding your question, but I think you mean how do you get the content div to take the rest of the row (regardless of what's in the left box). I think the solution has a few steps (assuming you can adjust the markup): Put the image into...
java,swing,jframe,jpanel,aspect-ratio
You may use a GridBagLayout and ComponentListener, For example: (inspired from: https://community.oracle.com/thread/1265752?start=0&tstart=0) public class AspectRatio { public static void main(String[] args) { final JPanel innerPanel = new JPanel(); innerPanel.setBackground(Color.YELLOW); final JPanel container = new JPanel(new GridBagLayout()); container.add(innerPanel); container.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { resizePreview(innerPanel, container); } });...
jquery,jquery-ui,dialog,aspect-ratio,jquery-ui-resizable
That's because you are resizing (and keeping the aspect ratio of) the entire dialog. If you remove that .parent() call, you resize only the contents of the dialog window. But then, the dialog window don't resize with the contents, right? So you have to reset its size everytime you resize...
You could put everything in a wrapper div whose aspect ratio is maintained using the answer here (maintain aspect ratio of a div) Alternatively, or in conjunction, you could use CSS media queries to make the site display differently in response to different display sizes (width, height or both). This...
python,layout,resize,kivy,aspect-ratio
I managed to find a solution I was happy with with a lot of help from kived from the kivy chat. The below bases the game bounds on a 'background' image, then places a Relative Layout over this background image. For all subsequent children, the coordinate (0, 0) will refer...
android,android-camera,aspect-ratio
We can learn about general approach to this issue in this answer. Short quote: My solution was to first scale the preview selection rectangle to the native camera picture size. Then, now that I know which area of the native resolution contains the content I want, I can do a...
DEMO You need to define a viewBox on each element that you link to. because there can de different elements in one SVG document. So remove the viewBox from the element you link to. Add a viewBox to the place your linking from. I suggest you add the viewBox to...
Solution : FIDDLE (I striped most of your containers to make it simple to understand and work with) Explanation : NOTE : This solution is based on the fact that percentages (width and height) are relative the size of the parent element. Considering .section-images is a direct child of <body>...
java,android,image,aspect-ratio
You need a different android:scaleType in your layout. The ImageView.ScaleType documentation lists the different ones that are available. It sounds like you probably want to change matrix to fitCenter in your example.
wordpress,upload,orientation,attachment,aspect-ratio
You can write some code for it. Use http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata to get the width and the height, and then if $width/$height > 1 => landscape, otherwise its portrait. Store this value in the attachment using: http://codex.wordpress.org/Function_Reference/wp_update_attachment_metadata. You can use an action for this, such as: add_action('add_attachment', 'process_images'); Adding the solution as...
Your approach could work if this group box was inside vertical layout. As name says hasHeightForWidth is well defined when height depends on width (this was designed for text wrapping), not another way around (your case). What you can do? Try this (I've implemented something similar for QGraphicsWidget and it...
ios,objective-c,uitableview,autolayout,aspect-ratio
Just to add to @dreaming-in-binary's answer, IB may not allow you to set an equal width constraint against the content view (even though it is possible programmatically). Instead you could add a hidden reference view which spans the full width of the cell (i.e., has leading and trailing constraints to...
php,screen-resolution,aspect-ratio
<?php // create class to easily add and store resolutions class Resolution { public $x; public $y; } // create our original resolution and calculate its aspect ratio $origRes = new Resolution(); $origRes->x = 640; $origRes->y = 480; $originalRatio = ($origRes->x / $origRes->y); // create valid resolution $firstRes = new...
matlab,image-processing,aspect-ratio,fisheye
PART A To remove the requirement of a square input image, you may resize the input image into a square one with this - %%// Resize the input image to make it square reduced_dim = min(size(imR,1),size(imR,2)); imR = imresize(imR,[reduced_dim reduced_dim]); Few points I would like to raise here though about...
HTML: <div class="image-container"> <div class="image"><img src="http://lorempixel.com/160/60/abstract/1"></div> <div class="image image-auto"><img src="http://lorempixel.com/100/60/abstract/1"></div> </div> <div class="image-container"> <div class="image"><img src="http://lorempixel.com/60/60/abstract/1"></div> <div class="image image-auto"><img src="http://lorempixel.com/1000/60/abstract/1"></div> </div> <div...
html,css,thumbnails,aspect-ratio,ratio
I think This is the result you are trying to acheive. I added a div.img-wrapper around each thumb and some css magic HTML <div id="container"> <div class="col-4"> <div class="img-wrapper"> <a class="thumb" href="#"> <img src="http://mintywhite.com/wp-content/uploads/2012/10/fond-ecran-wallpaper-image-arriere-plan-hd-29-HD.jpg"> <div class="caption">Project untitled<br> Category</div> </a> </div> </div> <div class="col-4"> <div class="img-wrapper"> <a...
Disclaimer: This is only an educated guess, based on some knowledge on how to implement such a feat. As Kent Dahl already said, Floats are not precise, they have a fixed precision, which means 1.91 is really 1.910000000000000000001 or something like that, which ruby "knows" should be displayed as 1.91....
I'm not sure I quite understand your question, but I think this is what you want: p <- ggplot(my, aes(factor(x), y)) + geom_tile(aes(fill = z)) + scale_fill_gradient(low = "white",high = "steelblue") + theme_grey() + labs(x = "", y= "") + coord_fixed() + theme(axis.ticks = element_blank()) print(p) I converted your x...
responsive-design,css-float,aspect-ratio,css
So what I found is that you need to force an aspect ratio. Try modifying the following styles: .box-1 { width: 25% !important; height: 0; display: block; overflow: hidden; float: left; background-size: cover !important; line-height: 0; position: relative; padding: 13.75% 0 0 0; } .box-1 img { width: 100% !important;...
c#,winforms,resize,aspect-ratio
Here is a little testbed. Put a control on a form and assign the ViewPort variable to it. Here I chose a textBox1 but any control will do. Then pick a target aspect ratio, I chose TargetRatio_3_2. Try it by resizing the form! Note 1: I chose a form as...
android,ios,pdf,xamarin,aspect-ratio
Before Android L there is no way to display PDF without using a 3rd party library. In iOS you can use the native document viewer using UIDocumentInteractionController. The class is exposed in Xamarin.iOS so you should be good to go on that one.
css,css3,responsive-design,aspect-ratio,square
To fit and center a square div in the viewport according to it's width and height, you can uses one HTML tag with : vmin units for the sizing : vmin 1/100th of the minimum value between the height and the width of the viewport. (source : MDN) absolute positionning...
css,responsive-design,fluid-layout,aspect-ratio
As % padding/margin are calculated according to the width of the contrainer, you can't use the "padding technique" to maitain aspect ratio according to the height. For a CSS solution, you will have to use vh units : vh : 1/100th of the height of the viewport. Source For browser...
video,directshow,aspect-ratio,directshow.net
You cannot instruct EVR to override aspect ratio, it only has option to maintain AR or not. If you want to change aspect ratio of displayed video, you have to workaround methods instead: You can transform the video feed and change media type of the stream leaving payload intact and...
html,css,image,resize,aspect-ratio
Firstly, you can set max-width: 100%; and height: auto; on the image tags instead of hardcoding the height and max-widths on each image. Then you can set top: 40px; on the .halfContainer divs to make the container start 40 pixels down. Finally, set the max-height of the images to calc(100vh...
android,android-camera,aspect-ratio
Unless there is a bug in that code, you are getting the 'best' result possible. The aspect ratio of the phone's camera is not guaranteed to match that of the phone's screen. It is just a matter of deciding what the criteria are for the best result. That code is...
html,css,html5,css3,aspect-ratio
What is the CSS padding trick? First some information about containing blocks for reference. 9.1.2 Containing blocks In general, generated boxes act as containing blocks for descendant boxes; we say that a box "establishes" the containing block for its descendants. The phrase "a box's containing block" means "the containing block...
The problem is that you still lack a constraint. You can add another constraint such as height, or aspect ratio. However, when you add a constraint for aspect ratio, it would fill up the whole screen when in landscape. Unless, you're only using portrait, aspect ratio is fine. If you're...
css,image,responsive-design,aspect-ratio
You have to give a max-width:100% to your img. Plus background-size only works when you are working with background-images. Since you are applying max-width to your img there is no need to apply max-width to its parent #header Last, but not least try not use min-height and height:auto at same...
You can achieve your desired behavior by calling axis equal before you set the axis limits. While you set the axis range to equal values, your aspect ratio can be off. Therefore, the circular markers may not touch. Here's an example based on your approach (slightly modified for simplicity): figure;...
video,ffmpeg,resolution,aspect-ratio
Answer is here, in ffmpeg maual https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg
python,wxpython,wxwidgets,aspect-ratio
As VZ explained in his answer, your wxEVT_SIZE handler isn't a very good idea. Remove it. When using sizers, you have to work within the sizer infrastructure to achieve what you want. You want your TestGrid to fill as much space as possible within its parent, while maintaining a certain...