The future of the NdefGui and associated JITLib gui's

Hello everyone

I wanted to start this topic to perhaps open up a discussion about NdefGui and the other JITLib gui classes and their future.

I’ve opened a number of issues regarding especially the NdefGui class and I think some of the discussion is of a more general character and should perhaps happen here.

First of all: I love the JITLib gui’s, especially the NdefGui.
I use it all the time and I love it. I think it is a brilliant feature for newcomers to SC as well as experienced users who want to tweak parameters and mess around. That’s why I think it’s really important to have a look at how these classes may be improved because they are very important in my opinion but unfortunately also are in need of a modernization.

Below I will leave a list of relevant issues. But to sum up: The main problem for me is that the guis are very difficult to see and use on HiDPI screens which is becoming more and more the standard it seems.

As well as that, they aren’t “responsive” - what I mean by this is that they don’t resize/stretch properly when you pull the corners of the window. There’s also a number of problems with overflow detection making it difficult to use for Ndef’s with many parameters and text labels truncating the text to make the parameter even harder to read. A small additional thing is the labels of the buttons - some of which are full (like “pause”) and others abbreviations (like “CLR”), IMO it should be one or the other to make it more consistent.

Instead of patching all of these issues individually would it perhaps be time to have a more general look at these guis and revamp them?

I would suggest using LineLayout classes to organize the elements of the GUI and make the parameters’ sliders and buttons into “vanilla” sliders and buttons and using a more neutral color scheme that’s easier on the eyes.

And if we were to rewrite/redesign these gui’s are there any features that they don’t currently have that would be worth having? Or features that are currently there that perhaps could be removed?

My dream is for this discussion to lead to one or more pull requests to fix the outstanding issues and improve everything.

What do you all think ?

Relevant issues

These are some of the relevant issues, let me know if I’m missing anything

6 Likes

Also let me take the opportunity to once again say: JITLib is genius!!!

3 Likes

++ for default colors, so that setting QtGUI.palette/style will affect appearance consistently

2 Likes

A way to have buttons in Ndef ? does this exist? I have done the slider 0-1 work around but a simple mouse click push would be nice yes? Maybe this exists already?

i have added some lines to my supercollider to scale UIs from sclang (tested on linux only).

--- a/editors/sc-ide/core/sc_process.cpp
+++ b/editors/sc-ide/core/sc_process.cpp
@@ -139,6 +139,13 @@ void ScProcess::startLanguage(void) {
     sclangCommand = "sclang";
 #endif
 
+    //scale up sclang
+    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+    env.insert("QT_SCALE_FACTOR", "1");
+    env.insert("QT_AUTO_SCREEN_SCALE_FACTOR", "0");
+    env.insert("QT_SCREEN_SCALE_FACTORS", "2");
+    env.insert("QT_QPA_PLATFORM", "xcb");
+
     QStringList sclangArguments;
     if (!configFile.isEmpty())
         sclangArguments << "-l" << configFile;
@@ -148,8 +155,10 @@ void ScProcess::startLanguage(void) {
     if (!workingDirectory.isEmpty())
         setWorkingDirectory(workingDirectory);
 
+    QProcess::setProcessEnvironment(env);
     QProcess::start(sclangCommand, sclangArguments);
     bool processStarted = QProcess::waitForStarted();
+
     if (!processStarted)
         emit statusMessage(tr("Failed to start interpreter!"));
 }
1 Like

the good thing would be to have a clean simple way to specify whether you want a slider, range, knob, button, or a text field for the control

1 Like