Skip to content
Snippets Groups Projects
Commit b4a850ed authored by jsiegle's avatar jsiegle
Browse files

Minor updates to ControlPanel

parent 69047601
Branches
Tags
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<MAINWINDOW>
<BOUNDS x="1601" y="52" w="1696" h="1041" fullscreen="0"/>
<BOUNDS x="484" y="308" w="899" h="753" fullscreen="0"/>
</MAINWINDOW>
......@@ -74,8 +74,10 @@ RecordButton::~RecordButton()
CPUMeter::CPUMeter() : Label(T("CPU Meter"),"0.0"), cpu(0.0f), lastCpu(0.0f)
{
//startTimer(100);
//repaint();
MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
Typeface::Ptr typeface = new CustomTypeface(mis);
font = Font(typeface);
font.setHeight(12);
}
CPUMeter::~CPUMeter()
......@@ -97,16 +99,19 @@ void CPUMeter::paint(Graphics& g)
g.setColour(Colours::black);
g.drawRect(0,0,getWidth(),getHeight(),1);
g.setFont(font);
g.drawSingleLineText("CPU",65,12);
}
DiskSpaceMeter::DiskSpaceMeter()
{
//graph = g;
//updateDiskSpace(graph->getRecordNode()->getFreeSpace());
//repaint();
//startTimer(10000); // refresh every 10 seconds
MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
Typeface::Ptr typeface = new CustomTypeface(mis);
font = Font(typeface);
font.setHeight(12);
}
......@@ -124,11 +129,14 @@ void DiskSpaceMeter::paint(Graphics& g)
g.fillAll(Colours::grey);
g.setColour(Colours::pink);
g.setColour(Colours::lightgrey);
g.fillRect(0.0f,0.0f,getWidth()*diskFree,float(getHeight()));
g.setColour(Colours::black);
g.drawRect(0,0,getWidth(),getHeight(),1);
g.setFont(font);
g.drawSingleLineText("DF",75,12);
}
......@@ -205,7 +213,10 @@ void Clock::drawTime()
s = floor((totalRecordTime - m*60000)/1000);
} else {
glColor4f(1.0, 1.0, 1.0, 1.0);
if (isRunning)
glColor4f(1.0, 1.0, 0.0, 1.0);
else
glColor4f(1.0, 1.0, 1.0, 1.0);
m = floor(totalTime/60000);
s = floor((totalTime - m*60000)/1000);
}
......@@ -326,19 +337,19 @@ void ControlPanel::resized()
int h = getHeight();
if (playButton != 0)
playButton->setBounds(w-h*8,5,h-5,h-10);
playButton->setBounds(w-h*9,5,h-5,h-10);
if (recordButton != 0)
recordButton->setBounds(w-h*7,5,h-5,h-10);
recordButton->setBounds(w-h*8,5,h-5,h-10);
if (masterClock != 0)
masterClock->setBounds(w-h*6,0,h*6,h);
if (cpuMeter != 0)
cpuMeter->setBounds(20,h/4,h*4,h/2);
cpuMeter->setBounds(8,h/4,h*3,h/2);
if (diskMeter != 0)
diskMeter->setBounds(150,h/4,h*4,h/2);
diskMeter->setBounds(16+h*3,h/4,h*3,h/2);
if (audioEditor != 0)
audioEditor->setBounds(w-h*12,5,h*5,h-10);
......
......@@ -68,6 +68,9 @@ class CPUMeter : public Label//, public Timer //Component
void paint (Graphics& g);
private:
Font font;
float cpu;
float lastCpu;
......@@ -86,6 +89,9 @@ public:
void paint (Graphics& g);
private:
Font font;
float diskFree;
ProcessorGraph* graph;
//void timerCallback() {repaint();}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment