Advice on GUI toolkits

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Advice on GUI toolkits

Post by CrocoDuck »

Hi there!

I realize that this is one of those awfully open questions over an entire universe... but I would like to know if any of you guys is able to point me towards something to start looking at.

I am interested in programming some C++ standalone audio program and in my mind the GUI would have this feeling:

Image

There are few more examples in this google search.

However, I would also appreciate the ability to make good scientific data visualization, as I have in mind mostly measurement programs.

I never did any GUI programming outside visual basic (more than 10 years ago) and Matlab, so I guess my questions are:
  • How reasonable is for a beginner to get to a program with the feeling above?
  • GTK, TK, QT, wxWidgets all look pretty different "out of the box" from that. Are there toolkits that can make easier to get to that result?
  • What do you think is the best thing do to for a beginner (in terms of learning, regardless of this particular GUI look 'n' feel goal)?
Last edited by CrocoDuck on Mon Nov 13, 2017 9:54 am, edited 1 time in total.
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Advise on GUI toolkits

Post by Lyberta »

Qt seems to be the easiest to pick up. Qt Creator has nice WYSIWYG designer where you can draw forms.

I personally really hate programs that force their colors, it makes them unsuitable for visually impaired.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Advise on GUI toolkits

Post by CrocoDuck »

Lyberta wrote:it makes them unsuitable for visually impaired
Good point.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Advise on GUI toolkits

Post by tramp »

while you could do a UI like this with nearly any toolkit you mentioned, Nanogui comes in mind:
https://github.com/dalerank/nanogui-sdl

It's cross-platform, so learning it will give you the ability to create UI's for ALL platforms.
And there is a fork from drobilla which is based on plugl instead of sdl, which may be used, for the case, you decide to do some LV2 plugs.
https://github.com/drobilla/nanogui
For that case you may be then already on the right track, instead start new from scratch.

As you may know, I'm using gtk/mm, a UI like you show above could surly be done with gtk and some self made widgets. At least, you'll need to create your on widgets for special purpose anyway.

regards
hermann
On the road again.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Advise on GUI toolkits

Post by tramp »

Lyberta wrote: I personally really hate programs that force their colors, it makes them unsuitable for visually impaired.
Not necessary, if you force colours you should have a lock here before:
http://dasplankton.de/ContrastA/
On the road again.
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Advice on GUI toolkits

Post by sadko4u »

NEVER GTK. I'm very-very disappointed with this toolkit.
LSP (Linux Studio Plugins) Developer and Maintainer.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Advice on GUI toolkits

Post by CrocoDuck »

tramp wrote:while you could do a UI like this with nearly any toolkit you mentioned, Nanogui comes in mind:
That seems interesting, thank you! I will have a look at this.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Advice on GUI toolkits

Post by tramp »

sadko4u wrote:NEVER GTK. I'm very-very disappointed with this toolkit.
I wonder if you ever have developed a stand-alone GTK application.
On the road again.
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Advise on GUI toolkits

Post by Lyberta »

tramp wrote:Not necessary, if you force colours you should have a lock here before:
http://dasplankton.de/ContrastA/
All I see is empty gray page.

And it's not only about color but fonts too. You should use GUI toolkit that allows to completely override colors and fonts on OS level.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Advice on GUI toolkits

Post by tramp »

Lyberta wrote:All I see is empty gray page.
Maybe you can get this one:
https://webaim.org/resources/contrastchecker/
Lyberta wrote:And it's not only about color but fonts too. You should use GUI toolkit that allows to completely override colors and fonts on OS level.
For the record, GTK allow this. (In guitarix all colours and fonts been set in a gtkrc file).
On the road again.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Advice on GUI toolkits

Post by tramp »

Yes, it requires flash.
It just does the same as the other link I gave, it just looks a little nicer :o :
https://webaim.org/resources/contrastchecker/

It check if given colours have a sufficient contrast ratio to satisfy the WCAG 2.0 (Web Content Accessibility Guidelines)
On the road again.
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Advice on GUI toolkits

Post by Lyberta »

tramp wrote:Yes, it requires flash.
It just does the same as the other link I gave, it just looks a little nicer :o :
https://webaim.org/resources/contrastchecker/

It check if given colours have a sufficient contrast ratio to satisfy the WCAG 2.0 (Web Content Accessibility Guidelines)
It is still not reliable. My dad for example can't read black text on white background. I'm currently messing with Octave trying to make it readable for my dad. He currently uses MATLAB and can't read most of the UI because it is on gray background. He also can't read help because it forces white background.

Here is what I have so far:
Screenshot at 2017-11-15 19-03-50.png
Screenshot at 2017-11-15 19-03-50.png (183.07 KiB) Viewed 1024 times
This is a test VM and fonts on his PC are at least twice as big. I can't seem to force Qt to use white text on black background so this will still be unreadable for him.
folderol
Established Member
Posts: 2069
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 224 times
Been thanked: 400 times
Contact:

Re: Advice on GUI toolkits

Post by folderol »

The whole issue surrounding text on monitors is much more complex that most people realise (especially UI designers).

There is a classic demo of the effect of a white disc on a black background and vice-versa. Although they are drawn the same size, the white disc always looks bigger. This is because in your eye the image 'bleeds' to neighboring receptors - some people call it 'light crushing'. It is much worse with a light source like a monitor than it is with reflected light from a sheet of paper. As you get older it also becomes more of a problem - I say that from direct experience, speaking as a man of some {cough}maturity{cough}.

When you consider text it fairly obvious that the difficulty gets more pronounced. Black on white - and bits of the text disappear and your brain struggles to work out what you are seeing. White on black - and the text looks blurred and you think you've put the wrong glasses on!

Somewhat counter-intuitively you can improve things sometimes by reducing the contrast, and generally lowering the light intensity.

Unless a person is severely colour blind, another trick is to use colour differences as much (if not more) than contrast. The eye is far better at distinguishing colour than contrast. Beware, red/green colour blindness is more common in men that in women.
The Yoshimi guy {apparently now an 'elderly'}
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Advice on GUI toolkits

Post by tramp »

Lyberta wrote:It is still not reliable. My dad for example can't read black text on white background. I'm currently messing with Octave trying to make it readable for my dad. He currently uses MATLAB and can't read most of the UI because it is on gray background. He also can't read help because it forces white background.
I agree, that sucks. But, to be honest this is the system settings colour (Theme), not the one set by the application, which you wont to edit here.
I've no idea how to do it for Qt apps, as pointed out I'm using GTK, and for those I know it's easy to choose the colours I like in the desired config files (css or rc).

However, when you "design" a UI you cant be anyone's darling, as not only preferences differ, as well, as you point out here, people may have different stages of accessibility problems.
On the road again.
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Advice on GUI toolkits

Post by sadko4u »

A bit offtopic: I HATE antialiased fonts. In most cases antialiasing is working so bad so it shouldn't ever be. Even if black text on gray background is antialiased, there are suddenly appearing green, red and other pixels that have no relation to the background and the font color. I have good vision and, when looking on anti-aliased fonts, I feel like somebody has weared glasses on me. Holy shit, how people do not respect themselves when use anti-aliased fonts? Worse font anti-aliasing brings damage to the vision, IMHO.
LSP (Linux Studio Plugins) Developer and Maintainer.
Post Reply