Scene Builder preview shows all objects much larger than end result - user-interface

Here we have a preview of a window in Scene Builder behind the actual result when run with Netbeans. You can also see that my minimum sizes are set to USE_PREF_SIZE, with the values being auto-filled when I adjust the size of the window. The size difference between the windows is the first obvious difference.
Further, you'll notice that everything inside the window is smaller as well, all buttons, tables, fonts, etc.
I'm using Netbeans 8.2, Scene Builder 11.0.0, and JDK 8 update 251. Any ideas?

Figured it out! Hopefully this will be of some use to another aggravated user somewhere in the world.
The issue for me is that Windows was automatically scaling NetBeans. I found this resource for how to stop it:
Windows 10 does this for you now. Right click on your Netbeans shortcut (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\NetBeans) and select Properties. Go to the Compatibility tab and then select Change High DPI Settings. From there, check the Override High DPI Scaling box and set it to System.

Related

"Auto Layout before OS X 10.7"

I have an app in the app store, FractalWorks, which is based on a very old code-base. It's a big app, with quite a few screens. It was created in Objective-C before auto-synthesized properties were a thing, to give you an idea of how long ago it was created.
I wrote the app when I had a full-time gig as an independent software developer. I've since taken a day job, and support my apps in my spare time.
It still sells fairly well, and I recently used to add a section to the Wikipedia article on the Mandelbrot set on 3D images: https://en.wikipedia.org/wiki/Mandelbrot_set#3D_images_of_Mandelbrot_and_Julia_sets
I'm fluent in Auto-Layout now, but haven't taken the time to update the app's XIB files from "struts and springs" style to Auto-Layout - nor do I want to invest the time to do so if I can possibly help it.
I want to add a minor enhancement to the app that involves adding some UI elements and making one of the windows slightly taller. The minute I try to use Interface Builder to edit my XIB, it apparently silently changes it to Auto-Layout, and then complains about "Auto Layout before OS X 10.7". (It was released to the app store for OS X version 10.4, if memory serves, and I've moved the OS version up to the lowest version I could get away with in order to support legacy customers. It currently supports ≥10.6. The original, pre app-store version used even older OS versions.)
Googling this error suggests I use the file inspector on my XIB file to un-check a "Use AutoLayout" checkbox, but I don't see any such checkbox.
What am I missing?
If I use Xcode's code review button to compare the XIB file before and after editing it, various "tool version" values are changed, as well as it gaining a setting useAutolayout="YES". Editing that to read useAutolayout="NO" does not solve the problem.
All the credit goes to matt and his comment.
1. In the Navigator (left panel) go to issue navigator and click on the error.
2. In the Inspectors panel (right panel) the Size inspector will be automatically selected. Switch Layout from Automatic to Translates Mask Into Constraints.
Update: It's called Autoresizing Mask now.
3. Repeat for every occurrence of this error.
You may end up with an error not in the Illegal Configuration group like the following which opens the All Messages view in the middle and doesn't open the Size inspector.
This is a compile time error, just build/run your app again.
And also from the previously mentioned comment:
Be careful not to make any constraints, as that will cause an incoherent situation.
If you have multiple auto layout errors, which in all likelihood you will have, select all the controls in a window and perform the operation once rather than for each individual control. Repeat for each window.

How is it possible to determine the correct drawable size of a window on Windows 10? (SDL2)

I am working on an OpenGL application. I use a high-dpi screen, and the Windows GUI is scaled to 125%, to make the programs look like on a regular screen.
If I create a 800*600 window using SDL2, it appears the same size as in a regular screen, but it is 1000*750 px. Since I use deferred rendering, I have to create buffers with the same size as the drawable area, so I would like to find out the real size of the window in pixels
If I call SDL_GL_GetDrawableSize I incorrectly get 800*600 instead of 1000*750.
I added the flag SDL_WINDOW_ALLOW_HIGHDPI on window creation.
What do I wrong?
Edit:
If I change DPI Awareness in Visual Studio to Per Monitor High DPI Aware then the window is really 800*600, but it looks small. It should be 1000*750 because the scaling factor in the Windows settings is 125%
Your post is from Dec 2017 and your SDL version (2.0.7) comment from Jan 2018. Your bounty is up to date, but without newer information.
The main problem is, SDL2.0.7 didn't support HighDPI correctly on windows. In May 2017, they prepared a bigger patch, but it was merged on Feb. 2018, so after the version of SDL2.0.7. As far as I see it, it was introduced in SDL2.0.8. The primary changes were made in the file src/video/windows/SDL_windowswindow.c. I compared the sources and the changelog. It's definitively upstream, but someone forgot to write it down in the WhatIsNew.txt, which is very annoying.
I strongly suggest upgrade SDL to at least 2.0.8, better 2.0.10.
Btw. the author of the patch is mentioning, you need to use the new hint SDL_HINT_VIDEO_HIGHDPI_ENABLED.
In the worst case, if you have still trouble, you can use GLFW instead of SDL.
EDIT:
The Questioner provided new informations today.
You can query DPI value per Monitor on windows via GetDpiForMonitor and calculate from that the size.
Since you're using OpenGL with deferred shading: Ensure you're setting glViewPort correctly for every render pass.

iPhone 6(s) plus not scaling new application correctly for some users

I have a brand new Swift 2.0 XCode 7 Storyboard based application.
Target is set to 9.2. I'm currently supporting any device with GPS that can run ios 9.2
I started with the Tabbed View Template and I'm working in wAny and hAny and a single Storyboard.
It works fine in the simulator on a bunch of phones, both orientations and works fine on my 6s plus, 6s, 6 plus and a 5.
But for some users the scaling is wrong and everything comes out squished.
Even in landscape mode the TabBar Icons are very close to each other.
Narrower than even on my 6s plus in portrait.
I believe this is caused by my application not having a Launch bitmap.
My understanding is there are two ways to implement this.
Launcher .XIB/.NIB with half a dozen specific sized bitmaps attached. Or a StoryBoard Launcher with ... exactly what.
The "Or StoryBoard" is a little vague. But I wanted to keep things using the modern approach since this app is new and targeted users tend to have the latest device.
So I created my Launch Image set and tried to attached it to the UIImageView in the Launcher StoryBoard. It won't list items that are tagged as "Launcher Image Set". It will show other Image Sets and Icons. But not the ones specifically for Launcher. It shows an "L" in the xcassets list next to the Launcher Image set. I believe I have the build project setting set correctly and it looks perfect on many of the same exact devices.
After some digging, I read that if you use the "StoryBoard" method you don't need the 6 or so bitmaps anymore. You can put anything in the Storyboard Launcher View and treat it just like you would treat your main storyboard.
So I did that. I just centered a small image.png file in the View of the Launchers Storyboard. Works on all simulations and my iPhone 6s plus. I did not pin it to the edges because that would mess up the aspect ratio of the image.
A very small set of users still have the issue and one of them even uninstalled and reinstalled.
I tried playing with setting phone Zoomed, Normal, Text Size, Bold etc. They all work. Users also don't have anything out of the ordinary on these system settings.
So first, do I need the 6 proper sized bitmaps or not? I read conflicting info on this.
If I want to use the 6 images on a storyboard how to I get them in the UIImageView of the Launcher StoryBoard if they won't list? Should I put them in a regular image set. Does the "Launcher Image Set" only work for the for the Launcher.XIB?
If it's not the Launcher window, what else could it be causing this?
I know I could create a XIB/NIB with the 6 bitmaps. But that seems like I'm going backwards and I don't care about old OS versions or older phones.
I think I found my answer. When using a Storyboard Launcher you cannot use a "Launch Image Set" for your Launcher Storyboard. You have to use an Image Set.
This is the best Video I found that covers it A-Z.
https://www.youtube.com/watch?v=Vz6tCgXgZFo
It also didn't fix my initial problem. Which I'll post separately. It scales correct in Portrait but not in Landscape for hand full of users. Using the same hardware as others that it works fine on.

Firefox 31 Web Console Layout

Firefox 31 has changed my web console layout and I can't find the option to change it back. Being that I have a widescreen monitor I prefer the console to the right. When I select an array/object to view it opens it in a split as expected, but ever since the update I can't get the split to stack them vertically so they can use more width. Am I just not seeing this option?
Update: For Firefox up to v33 use this plugin, for 34+ behavior has changed. Read this thread on Bugzilla for details: https://bugzilla.mozilla.org/show_bug.cgi?id=1084004
This was added in Firefox 34, now in Beta. It is not in Firefox 33, the current release.
If you have the toolbox docked to the side, the Object Viewer pane will automatically drop to the bottom if the toolbox gets too narrow, see this gif for a visual example:
No, you are not missing the option. The option does not exist.
However, here is a quick-and-dirty extension that does what you want for Firefox 31.0 through 34.0:
http://www.mediafire.com/download/oxt4c5o5vypca85/place-webconsole-object-view-vertical%40makyen.foo.xpi
I tested it on Firefox 31.0, 32.0.1, 32.0.2, 33.0b4 (current beta), and 34.0a2 (Aurora, the current alpha). All of them worked. The file the extension changes, webconsole.xul, has 4 slightly different versions in that range of Firefox releases. One of the changes was between 32.0.1 and 32.0.2.
I had another extension for which I was already working on a similar set of compatibility and testing and then Mozilla released FF 32.0.2 today. Leaving this solution as only compatible for 31.0-32.0.1 just didn't sit well with me, so I did the mods to give it the wider compatibility range.
In 34.0a2 the stock behavior of this part of the webconsole is a bit different. The object view automatically shifts from vertical to horizontal depending on how wide the devtools sidebar is. Visually, this is similar to how the inspector behaves in 31.0 (and later). The above extension, when installed on 34.0b, will lock it in the vertical position. Personally, I really don't like the auto-choosing of vertical/horizontal. I would want a control and be able to lock it the way I want it when I am viewing it. This is not supposed to be a glitzy wiz-bang UI thing to get the masses interested. This is a: I want to get my work done now and I want it my way because that's how I work fastest/best. Sorry, I got up on my soapbox there a bit.
It's the icon that has a rectangle at the bottom. In your case (Where the yellow arrow points):

How do I anchor controls to one side in Xcode?

Ok, so I come from programming in Visual Basic on PCs, and now I'm trying to remake my programs on OS X with Xcode, and so far I have been successful. One thing I have noticed, however, is that when I try to resize the window, controls either stay in the same place or stick to one side. In Visual Basic, I used the "anchor" or "dock" properties to decide whether controls would stretch as the window resized or if the stayed to one side. I was just wondering if there is an easy way to do this in Interface Builder. I am using Xcode 4.5.1 and any help I could get would be great.
Thanks in advance!
In IB, click on the file inspector (The first icon), then make sure auto layout is not checked. Then go to the size inspector (The 5th icon) and make your changes.
(source: fredandrandall.com)

Resources