Code doesn’t care whether you are new to programming or an old pro, a citizen developer or the head of engineering, some missteps can catch any of us. Read on to learn some of the most common programming pitfalls and how to avoid them.
About three years ago, we added HiDPI/Retina support to our framework which was released to users as part of Xojo 2016r1 when we also shipped our first HiDPI IDE.
With Apple’s announcements at WWDC 2018 and the introduction of dark mode it was time to revisit our graphics and the overall appearance of the IDE again. Here are some things which contribute to the changes that have been made and ones that you will see in the coming months.
As you may already know, 2016 was Xojo’s 20 Anniversary. Sitting down to write this post, I can’t help but think back to 20 years ago and starting what has now become Xojo. Most of the developer tools that were around when we started either no longer exist or are no longer published by the people who had the original vision to create them in the first place. In that respect, we are members of a very exclusive club. I’m also pleasantly surprised at how many users from way back then are actively using Xojo today. I take great pride in the fact that we have created something that has that kind of staying power.
The web framework got some love in Xojo 2016r2… General Changes First, the Web Framework now has support for Retina/HiDPI in supported browsers. All controls…
The most direct way to support HiDPI* for custom controls is to draw into the Graphics object passed into the Paint event. That graphics object is already configured with the appropriate scale factor and double buffering- the entire control will be handled correctly by the framework if the DoubleBuffer property is set.
*As with other posts, we’ll use “HiDPI” to refer to both HiDPI on Windows and Retina on OS X.
“Retina” is the name for high resolution screens on Mac and iOS devices while “HiDPI” is the Windows equivalent. For simplicity, I’ll use HiDPI (which really is the universal technical term) for the rest of this blog post. Now that we have HiDPI support in Xojo, if you app doesn’t use any pictures, you can simply open your project, click on Shared under Build Settings and turn on the “Supports Retina/HiDPI” option. That’s all you need to do to have a HiDPI version of your app!
Having said that, if you are creating or using pictures in your project, there may be a few adjustments you’ll need to make to your code. A little over a year ago the process of making sure we had all of the necessary graphics together to build a Retina/HiDPI IDE was added to my to-do list. While 95% of the icons created for the Xojo IDE in 2013 already existed, most of the graphics that made up the IDE itself did not, and the IDE itself needed a bit of an overhaul to get it ready for the big change, both in graphics and in code…
During my keynote address last April at XDC, the Xojo Developer Conference, I said that we would be adding Retina support (the OS X feature that provides for ultra-high resolution displays) to the OS X framework in the 4th quarter of this year. We have been working very hard on Retina support both for the OS X framework and for the IDE itself. We didn’t want to stop there though. Windows also supports ultra-high resolution displays. For Windows, this technology is called HiDPI. Xojo is a cross-platform tool so we decided we should support both Retina and HiDPI, and do it in such a way that you don’t have to do much of anything and they just work.
Today’s laptops and monitors support high resolution displays which allow you to pack more information and content on the screen. Although one common complaint is that people find the text to be too small at the maximum resolution, Windows’ solution to this is the ability for the user to adjust the DPI setting.