Can D be cute? (Qt)
Michel Fortin
michel.fortin at michelf.com
Sat May 8 15:11:59 PDT 2010
On 2010-05-08 16:15:58 -0400, "Nick Sabalausky" <a at a.a> said:
> "Michel Fortin" <michel.fortin at michelf.com> wrote in message
> news:hs3uft$efc$1 at digitalmars.com...
>> On 2010-05-08 09:24:55 -0400, Lutger <lutger.blijdestijn at gmail.com> said:
>>
>>> 2: It's attractive not only because it is so huge, well designed and
>>> supported, but also because it performs, is cross-platform and looks good
>>> everywhere (as opposed to Java and gtk)
>>
>> Everywhere? Saying Qt apps looks good and behave well on a Mac is kind of
>> a stretch. I have yet to see one that is not sub-par compared from what I
>> would expect from an equivalent Cocoa implementation.
>
> This is first I've heard of that. I find it interesting though. Can you post
> comparison screenshots and explain some of the behavioral differences? I
> promise I'll try my best to refrain from another of my "Apple sucks" rants
> ;) (I saw the screenshot that was linked to in the comment that you linked
> to, but I couldn't quite make heads or tails of what exactly it was
> demonstrating.)
It's not "crappy" (I never said that), it's just that there are so many
things which are just "almost right" and a few things that you'd expect
to work but don't that it's really easy to tell it's a cross-platform
app.
Also, when the Qt guys say they're using Cocoa, they're only using
Cocoa drawing routines (as far as I know), and not everywhere. Many of
the differences are behavioral or different layout conventions or the
non-use of Mac-specific controls, which are much more complicated to
fix.
I'm looking at Opera 10.53 and just by opening the preference pane I
can tell you this is wrong:
- The first and last tab at the top have too small margins on their
external edge of the simulated segmented control.
- Clicking on a tab selects the tab immediately (as on Windows); it
should select only on mouse-up.
- The spacing between controls is quite strange in the Advanced tab.
- Clicking on a non-text control puts the keyboard focus on it, even
when the system-wide setting is set to not do that.
- Separator bars aren't drawn correctly (should not have a lighter line
below the bar).
- Lists (not just in the preference panel) use the text selection color
instead of the darker list selection color.
- Text in pop-up buttons is misaligned, and should use "..." when too
long to fit.
- Text in text boxes has incorrect margins.
- Text in labels should be right-aligned when the associated control is
on the right of the label.
- The focus ring around text boxes is smaller than it should be.
- List boxes lack a focus ring when focused.
- List boxes headers combined with the box border makes a two
pixel-border, this shouldn't happen and does not with Cocoa controls.
- The check box and radio button size doesn't fit with the size for the
rest of the UI (they took the "small" variant instead of the "normal"
variant (speculation: perhaps when checked the checkmark would go too
far outside of the box for Qt to be able to handle it, so they took the
smaller one?).
- Disabled buttons: the text should be dimmed too, not just the button border.
- Preferences in OS X should not have OK/Cancel buttons, they should
apply immediately as you change them. They should also be modeless (not
blocking other windows).
- The help button should be a standard Help button (round, purple, and
with a question mark).
- Selecting a file/folder by having a Choose button next to a text
field with a path is very un-mac-like.
- Font selection buttons displaying the currently selected font should
use a bezel style button or something similar, not the standard push
button style which looks out of place.
- When another window in frontmost, controls when clicked with the
command key pressed still bring the window to the foreground; they
shouldn't.
- The color selector control has exactly the same bevel pixels as a
Windows 95 button!
- More generally, the layout of dialog boxes doesn't follow what we
generally see in Mac apps, specifically columns of "Add", "Edit",
"Delete", "Rename" buttons should use icons and be located below the
list field, or minimally they should use the smaller control style to
match the text size in the list box.
Looking elsewhere in the app (but ignoring the custom chrome Opera uses
for its browser window):
- Various dialogs that pop up should be sheets attached to the browser
window or the preference window instead of being standalone windows.
- Right clicking a word in a text box should select the word if the
click isn't already inside the selection.
- Can't access the Mac OS X's definition dictionary or make a Google or
Spotlight search by right-clicking a term in a text field. And
system-wide context-menu plugins and services don't show up either.
- Text fields can't use the built-in Mac OS X spellchecker either
(there's a custom spell checker, not sure if it comes with Qt or Opera).
- "radio-groups" in menus should use the same checkmark as checkable
items, not a diamond.
- A diamond should be used in the window menu to indicate minimized
window, but of course that's not the case.
- The "Details >>" button looks like a Windows thing. There's a special
square button style with a triangle in Mac OS X for this kind of button.
- "Next >" and "< Previous" should not have "<" or ">" on a Mac.
- Tooltips are not exactly of the standard shape, color and
transparency. When they appear, there's a very short flicker until the
text is drawn inside. They should also contain a description, not just
a word ("Go to home page" instead of "Home").
- I haven't tested, but I'm pretty sure VoiceOver doesn't work anywhere
in this UI.
- Apparently, it doesn't look Opera can use the Mac OS X keychain to
store passwords. Perhaps Qt made that more difficult, but I don't know.
...
I guess that's enough for today.
Note that there are a many Mac apps that break one or another of these
rules (iTunes preferences come to mind, many Carbon apps too), but only
cross-platform toolkits breaks as many.
Some of these are more a failure of the application developer to adapt
his application to be more mac-like, but most are problems or
limitations within Qt itself. Also, even though it's possible, the
complexity of using platform-specific controls in Qt generally pushes
developers to limit themselves to controls available on all platforms.
The end result is something usable, but nonetheless feels a little
alien.
Perhaps looking at just Opera is not fair, but this seems like a pretty
typical Qt app to me, and I believe they did some effort to make it
better on a mac recently. But in comparison, Chrome is much better:
they're using a real Cocoa GUI and it shows.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list