5 ms·
The Mac screenshot I see on the home page looks about as non-native as the average Qt app.
by Camillo 12y ago
The Mac screenshot I see on the home page looks about as non-native as the average Qt app.
- WoodenChair 12y agoThat's a matter of design, not an observation based on technical merits.
- ZenoArrow 12y agoMaybe I'm missing something, but isn't the main 'hook' for this library that it looks native? Looks like it uses GTK+, so from a technical standpoint it would be as "native" as Qt.
- ColinCera 12y agoIt does not use GTK+ on a Mac, it uses Cocoa, so it is fully native. Read the docs.
- icefox 12y agoHmm, they should update their front page than. It is pretty clear in stating "Toga uses the system native python GTK+3 bindings for display purposes."
- ColinCera 12y agoThat sentence you quote is immediately underneath the heading "Problems using virtualenv under Ubuntu" — it applies only to Ubuntu, where they do use GTK. But on Mac, they use Cocoa, as stated in several places in the docs.
- freakboy3742 12y agoProject author here; let me confirm that Toga only uses GTK+ under Ubuntu/Linux. On OS/X, it uses Cocoa. I've just clarified the text in that section of the website. Thanks for the heads up.
- ZenoArrow 12y agoThank you for the clarification.
- ColinCera 12y agoIt's using native Cocoa controls, so I'm not sure why you don't think it looks native.
- i_am_ralpht 12y agoBecause the layout that's presented is not native. Actual mac apps don't have tabs and toolbars pushed together like that, and the margins are different. wxWidgets can use the platform native controls, but the apps rarely look native because the layouts and behaviors are non-native. Mac/GNOME/Windows all have different ideal metrics for spacings, control placement and labeling (OK/Cancel vs Cancel/"Do Thing") -- being native means getting all of those details correct.
- ColinCera 12y agoFair point. The spacing and margins are totally wrong, for sure. But that's just spacing & margins, and I assume that's easily adjusted (and they should do that, so their demo doesn't look ugly). But nonetheless, the widgets are native Cocoa widgets, so they not only look native, they feel and behave native, something you can't say about Qt (at least not to the same degree — although I develop with Qt, love Qt, and have zero issues with the way Qt applications look and feel on Mac).
- freakboy3742 12y agoThe spacing and margins are all manually specified (or, in the case of the example, aren't specified at all, so they default to 0). If you cared to do so, this spacing could be manually adjusted. Under the hood, it's 100% native widgets (i.e., on OSX, the code is actually instantiating an NSButton, adding it to an NSView, set as content on an NSWindow; on Ubuntu, it uses Gtk.Button etc), so the look and feel of the widgets themselves are exactly as the platform dictates.
- vsl 12y ago"100% native widgets" is the easy part and wxWidgets/wxPython is doing just that (and always have been). Providing higher-level API is harder and again, wx does that too. But the devil is in the detail. The reason why many wx apps don't look very well on OS X is because getting all the tiny details like spacing, behavior, layout etc. right for all supported platforms, with (mostly) same code base is hard - and it has nothing to do with the look of individual widgets. But well, you'll learn that during the journey ;)
- Derbasti 12y agoThere are probably quite a few Qt apps you haven't noticed because they look perfectly native. What you mean is "a badly designed Qt app".
- aroman 12y agoi highly, highly doubt that, but i'd love to be proven wrong. what's the best example of an OS X-native-looking Qt app you know of?
- Derbasti 12y agoSpotify isn't bad.
- freakboy3742 12y agoSpotify's UI is many things, but it doesn't even begin to appear system native.