Better styles for my browser?



  • Hello everyone,

    As I have been working on my browsers functionality, I have also been keeping an eye on the usability/UI/UX/aesthetics of it.
    I have been using the following code for the styling of it:

    @QApplication::setStyle(QStyleFactory::create("fusion"));@

    I am using "fusion" because it is the only one that looks halfway decent. I have tried other options like "macintosh" or "windows" but the look hideous and antiquated. How can I make it look like a modern OS X/Windoze 8/Ubuntu application. Essentially I would like to be able to style it like a modern OS application, not one that looks like it was made for Windows XP.

    Thanks for your help!



  • Any ideas out there?


  • Moderators

    If you don't explicitly set a style, your app will use the default one, which is the native one for the platform - these use OS specific drawing APIs like DWM on Windows etc.

    I think you need to be more specific. Is something not looking native or would you like a specific non-native look. Are you interested in any particular widget? What exactly would you like to change? Some screenshots would be helpful.



  • I would like to be able to preview it in different native styles, and I do not think the provided styles look much like the native ones. The macintosh style (I'm using OS X) for example has the tabs on the tab widget centered and it looks very old-school. I would like to see how my app would appear on several different operating systems such as Win8 and Ubuntu. How can I make it look like its native for a modern OS.
    Again, the "Macintosh", "Windows", and "Fusion" styles look very old, Im not really keen on making my computer look the way it did in 2001 hahaha.

    Thanks!


  • Moderators

    Generally you can't preview styles cross-platform. As I've said they use OS specific APIs that are not present on other platforms.

    I don't know much about macs but from whatever screenshots google shows me, tabs actually are centered in native theme. It's just that there are not that many natively tabbed apps and those that are, do their own drawing. Being pretty doesn't make them native. You can do your own styling too you know.

    "Windows" style does look old (98ish) and is not meant to be used on anything except Windows with disabled advanced theming. Since it's so basic though, it is an exception to the rule and can be previewed on other platforms (actually it is used as a "fallback" theme).

    The default Windows style for anything modern is "Windows Vista", which uses all sorts of bells and whistles of Aero. It looks as native as it gets. You can't see it on anything other than Vista/Win7/Win8 with Aero theming enabled. Certainly not on a Mac.

    As for linux there's no single window manager or style there so fusion is used as a lowest common denominator.

    Of course some apps do their own rendering of elements, but again, this usually has nothing to do with native style.



  • Ok thank you. So do Safari and all the other Apple-made apps actually do there own drawing rather than use the OS X 'native' style? Is fusion the only built in option for Linux (no Ubuntu/KDE, etc)? Are buttons, line edits, etc. drawn by aero on windows? I thought that Aero was just concerned with the window title bar and 'exit/minimize' buttons. I also recall reading (I could be wrong, so please correct me) that Win8 used 'Metro' rather than Aero. To be honest, it seems like a slight shortcoming of Qt that there is no Win8 style option.


  • Moderators

    As I said - I'm no expert on Mac, but since there's also Safari for Windows and it looks the same - yeah, they're probably drawing everything, not only tabs, by themselves.

    The window manager on Windows (Vista+) is called DWM, Aero is one of the styles supported. The previous (XP) window manager had no name and the style was called Luna.
    Windows Vista and above use the same style - Aero. Style is responsible for drawing everything from window borders, through control shapes, up to animations. In Windows 8 they changed some colors and dropped transparency (the glass effect) but it's still the same style. API didn't change and so the Qt Vista style is still valid and works correctly. There's no need for separate style on Windows 8. It's already covered.

    Apart from Aero, which is used in desktop apps, Windows 8 also introduced new type of apps, so called "modern style apps" or "windows store apps". These use completely new set of APIs called WinRT. A port of Qt to this new API "is ongoing":http://blog.qt.digia.com/blog/2013/12/12/qt-for-windows-runtime-technology-preview-released at this moment and it will probably be available somewhere around Qt 5.3 or 5.4



  • Okay, thanks for clearing that up for me!



  • Hey so I was wondering if there are any other options that work other than macintosh, fusion, and windows. I can't seem to get motif, clean looks, or cde to work


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.