mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
Logical UI / font size adjustments
This commit is contained in:
parent
f765dc1898
commit
ee6852b354
@ -57,7 +57,7 @@ AppFrame::AppFrame() :
|
||||
int attribList[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 };
|
||||
|
||||
mainSplitter = new wxSplitterWindow( this, wxID_MAIN_SPLITTER, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH | wxSP_LIVE_UPDATE );
|
||||
mainSplitter->SetSashGravity(12.0/37.0);
|
||||
mainSplitter->SetSashGravity(10.0/37.0);
|
||||
mainSplitter->SetMinimumPaneSize(1);
|
||||
|
||||
wxPanel *demodPanel = new wxPanel(mainSplitter, wxID_ANY);
|
||||
@ -158,7 +158,7 @@ AppFrame::AppFrame() :
|
||||
|
||||
demodTuner = new TuningCanvas(demodPanel, attribList);
|
||||
demodTuner->setHelpTip("Testing tuner");
|
||||
demodTuner->SetMinClientSize(wxSize(200,24));
|
||||
demodTuner->SetMinClientSize(wxSize(200,28));
|
||||
demodScopeTray->Add(demodTuner, 1, wxEXPAND | wxALL, 0);
|
||||
|
||||
demodTray->Add(demodScopeTray, 30, wxEXPAND | wxALL, 0);
|
||||
@ -196,7 +196,7 @@ AppFrame::AppFrame() :
|
||||
// vbox->AddSpacer(1);
|
||||
|
||||
mainVisSplitter = new wxSplitterWindow( mainSplitter, wxID_VIS_SPLITTER, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH | wxSP_LIVE_UPDATE );
|
||||
mainVisSplitter->SetSashGravity(5.0/25.0);
|
||||
mainVisSplitter->SetSashGravity(6.0/25.0);
|
||||
mainVisSplitter->SetMinimumPaneSize(1);
|
||||
|
||||
// mainVisSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( AppFrame::mainVisSplitterIdle ), NULL, this );
|
||||
@ -1304,10 +1304,10 @@ void AppFrame::OnDoubleClickSash(wxSplitterEvent& event)
|
||||
|
||||
if (event.GetId() == wxID_MAIN_SPLITTER) {
|
||||
w = mainSplitter;
|
||||
g = 12.0/37.0;
|
||||
g = 10.0/37.0;
|
||||
} else if (event.GetId() == wxID_VIS_SPLITTER) {
|
||||
w = mainVisSplitter;
|
||||
g = 7.4/37.0;
|
||||
g = 6.0/25.0;
|
||||
}
|
||||
|
||||
if (w != NULL) {
|
||||
|
@ -214,6 +214,15 @@ void SpectrumPanel::drawPanelContents() {
|
||||
double hPos = 1.0 - (16.0 / viewHeight);
|
||||
double lMhzPos = 1.0 - (5.0 / viewHeight);
|
||||
|
||||
int fontSize = 12;
|
||||
GLFont::GLFontSize fontEnumSize = GLFont::GLFONT_SIZE12;
|
||||
|
||||
if (viewHeight > 135) {
|
||||
fontSize = 16;
|
||||
fontEnumSize = GLFont::GLFONT_SIZE16;
|
||||
hPos = 1.0 - (18.0 / viewHeight);
|
||||
}
|
||||
|
||||
for (double m = -1.0 + mhzStart, mMax = 1.0 + ((mhzStart>0)?mhzStart:-mhzStart); m <= mMax; m += mhzStep) {
|
||||
label << std::fixed << currentMhz;
|
||||
|
||||
@ -237,7 +246,8 @@ void SpectrumPanel::drawPanelContents() {
|
||||
glEnd();
|
||||
|
||||
glColor4f(ThemeMgr::mgr.currentTheme->text.r, ThemeMgr::mgr.currentTheme->text.g, ThemeMgr::mgr.currentTheme->text.b,1.0);
|
||||
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString(label.str(), m, hPos, 12, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER);
|
||||
|
||||
GLFont::getFont(fontEnumSize).drawString(label.str(), m, hPos, fontSize, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER);
|
||||
|
||||
label.str(std::string());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user