Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team review 4 5.1.0 #1060

Merged
merged 10 commits into from
May 21, 2022
2 changes: 1 addition & 1 deletion OpenBCI_GUI/ADS1299SettingsController.pde
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class ADS1299SettingsController {
.setPosition(0, 0)
.setCaptionLabel("")
.setSize(120, 20)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down
14 changes: 7 additions & 7 deletions OpenBCI_GUI/ControlPanel.pde
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ class WifiBox {
.setPosition(x + 90, y + 100)
.setCaptionLabel("")
.setSize(w - padding*2, 26)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down Expand Up @@ -1298,7 +1298,7 @@ class SessionDataBox {
.setPosition(x + 60, y + 32)
.setCaptionLabel("")
.setSize(187, 26)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down Expand Up @@ -2100,7 +2100,7 @@ class GaleaBox {
.setPosition(x + w - padding*2 - 60*2, y + 16 + padding*2)
.setCaptionLabel("")
.setSize(120 + padding, 26)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down Expand Up @@ -2299,7 +2299,7 @@ class BrainFlowStreamerBox {
.setPosition(x + padding * 3, y + HEADER_H + padding*2)
.setCaptionLabel("")
.setSize(120, OBJECT_H)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down Expand Up @@ -2330,7 +2330,7 @@ class BrainFlowStreamerBox {
.setPosition(x + padding*5 + w/2, y + HEADER_H + padding*2)
.setCaptionLabel("")
.setSize(50, OBJECT_H)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down Expand Up @@ -2530,7 +2530,7 @@ class StreamingBoardBox {
.setPosition(x + padding * 3, y + headerH + padding*2)
.setCaptionLabel("")
.setSize(w / 3, objectH)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand All @@ -2547,7 +2547,7 @@ class StreamingBoardBox {
.setPosition(x + padding*5 + w/2, y + headerH + padding*2)
.setCaptionLabel("")
.setSize(w / 5 + padding, objectH)
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down
4 changes: 2 additions & 2 deletions OpenBCI_GUI/CustomCp5Classes.pde
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ public class MenuList extends controlP5.Controller {
menu.fill(127, 134, 143);
}
if (i == activeItem) {
menu.stroke(184, 220, 105, 255);
menu.stroke(TURN_ON_GREEN);
menu.strokeWeight(1);
menu.fill(184, 220, 105, 255);
menu.fill(TURN_ON_GREEN);
menu.rect(0, 0, getWidth()-1, itemHeight-1 );
menu.noStroke();
} else {
Expand Down
11 changes: 7 additions & 4 deletions OpenBCI_GUI/Debugging.pde
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class HelpWidget {
outputWasTriggered = false;
}
}
// Color mode is switched to Hue, Saturation, Brightness in the next line
//Colors in this method are calculated using Hue, Saturation, Brightness
colorMode(HSB, 360, 100, 100);
color c = getBackgroundColor(saturationFadeValue);
stroke(c);
fill(c);
Expand All @@ -128,6 +129,7 @@ class HelpWidget {
}

private color getTextColor() {
/*
switch (curOutputLevel) {
case INFO:
return #00529B;
Expand All @@ -139,13 +141,13 @@ class HelpWidget {
return #D8000C;
case DEFAULT:
default:
return color(0, 5, 11);
return color(0, 5, 11);
}
*/
return OPENBCI_DARKBLUE;
}

private color getBackgroundColor(int fadeVal) {
//Colors in this method are calculated using Hue, Saturation, Brightness
colorMode(HSB, 360, 100, 100);
int sat = 0;
int maxSat = 75;
switch (curOutputLevel) {
Expand All @@ -156,6 +158,7 @@ class HelpWidget {
return color(199, sat, 97);
case SUCCESS:
//base color - #DFF2BF;
maxSat = 50;
sat = 25;
sat = (int)map(fadeVal, 0, 100, sat, maxSat);
return color(106, sat, 95);
Expand Down
12 changes: 4 additions & 8 deletions OpenBCI_GUI/OpenBCI_GUI.pde
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ final color buttonsLightBlue = color(57,128,204);
final color GREY_125 = color(125);
final color GREY_100 = color(100);
final color GREY_20 = color(20);
final color TURN_ON_GREEN = color(184,220,105);
final color TURN_ON_GREEN = color(223, 242, 191);
final color TURN_OFF_RED = color(224, 56, 45);
final color BUTTON_HOVER = color(177, 184, 193);//color(252, 221, 198);
final color BUTTON_HOVER_LIGHT = color(211, 222, 232);
Expand Down Expand Up @@ -337,7 +337,8 @@ void settings() {
globalScreenResolution.append(" X ");
globalScreenResolution.append(displayHeight);
//Account for high-dpi displays on Mac, Windows, and Linux Machines Fixes #968
pixelDensity(displayDensity());
if (isMac())
//pixelDensity(displayDensity());
globalScreenDPI = new StringBuilder("High-DPI Screen Detected: ");
globalScreenDPI.append(displayDensity() == 2);
}
Expand All @@ -349,12 +350,7 @@ void setup() {

//V1 FONTS
f1 = createFont("fonts/Raleway-SemiBold.otf", 16);
if (isMac()) {
f2 = createFont("Arial", 15, true);
} else {
f2 = createFont("fonts/Raleway-Regular.otf", 15);
}

f2 = createFont("fonts/Raleway-Regular.otf", 15);
f3 = createFont("fonts/Raleway-SemiBold.otf", 15);
f4 = createFont("fonts/Raleway-SemiBold.otf", 64); // clear bigger fonts for widgets

Expand Down
2 changes: 1 addition & 1 deletion OpenBCI_GUI/SignalCheckThresholds.pde
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SignalCheckThresholdUI {
.setPosition(_x, _y)
.setCaptionLabel("")
.setSize(_w, _h)
.setFont(createFont("Arial",12,true))
.setFont(p5)
.setFocus(false)
.setColor(color(26, 26, 26))
.setColorBackground(color(255, 255, 255)) // text field bg color
Expand Down
2 changes: 1 addition & 1 deletion OpenBCI_GUI/W_Networking.pde
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class W_Networking extends Widget {
cp5_networking.addTextfield(name)
.align(10,100,10,100) // Alignment
.setSize(120,20) // Size of textfield
.setFont(createFont("Arial", 15, true))
.setFont(f2)
.setFocus(false) // Deselects textfield
.setColor(OPENBCI_DARKBLUE)
.setColorBackground(color(255,255,255)) // text field bg color
Expand Down