mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-22 03:36:24 -05:00
Modem property minsize tweak/def
This commit is contained in:
parent
a9f35a4c35
commit
11f3fb9c68
@ -42,7 +42,8 @@ wxEND_EVENT_TABLE()
|
||||
#include "RigThread.h"
|
||||
#endif
|
||||
|
||||
#define APPFRAME_MODEMPROPS_SIZE 240
|
||||
#define APPFRAME_MODEMPROPS_MINSIZE 20
|
||||
#define APPFRAME_MODEMPROPS_MAXSIZE 240
|
||||
|
||||
AppFrame::AppFrame() :
|
||||
wxFrame(NULL, wxID_ANY, CUBICSDR_TITLE), activeDemodulator(NULL) {
|
||||
@ -112,8 +113,8 @@ AppFrame::AppFrame() :
|
||||
|
||||
modemPropertiesUpdated.store(false);
|
||||
modemProps = new ModemProperties(demodPanel, wxID_ANY);
|
||||
modemProps->SetMinSize(wxSize(APPFRAME_MODEMPROPS_SIZE,-1));
|
||||
modemProps->SetMaxSize(wxSize(APPFRAME_MODEMPROPS_SIZE,-1));
|
||||
modemProps->SetMinSize(wxSize(APPFRAME_MODEMPROPS_MAXSIZE,-1));
|
||||
modemProps->SetMaxSize(wxSize(APPFRAME_MODEMPROPS_MAXSIZE,-1));
|
||||
|
||||
modemProps->Hide();
|
||||
demodTray->Add(modemProps, 15, wxEXPAND | wxALL, 0);
|
||||
@ -1537,13 +1538,13 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
||||
}
|
||||
|
||||
if (modemProps->IsShown() && modemProps->isCollapsed() && modemProps->GetMinWidth() > 22) {
|
||||
modemProps->SetMinSize(wxSize(22,-1));
|
||||
modemProps->SetMaxSize(wxSize(22,-1));
|
||||
modemProps->SetMinSize(wxSize(APPFRAME_MODEMPROPS_MINSIZE,-1));
|
||||
modemProps->SetMaxSize(wxSize(APPFRAME_MODEMPROPS_MINSIZE,-1));
|
||||
demodTray->Layout();
|
||||
modemProps->fitColumns();
|
||||
} else if (modemProps->IsShown() && !modemProps->isCollapsed() && modemProps->GetMinWidth() < 200) {
|
||||
modemProps->SetMinSize(wxSize(APPFRAME_MODEMPROPS_SIZE,-1));
|
||||
modemProps->SetMaxSize(wxSize(APPFRAME_MODEMPROPS_SIZE,-1));
|
||||
modemProps->SetMinSize(wxSize(APPFRAME_MODEMPROPS_MAXSIZE,-1));
|
||||
modemProps->SetMaxSize(wxSize(APPFRAME_MODEMPROPS_MAXSIZE,-1));
|
||||
demodTray->Layout();
|
||||
modemProps->fitColumns();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
ModemProperties::ModemProperties(wxWindow *parent, wxWindowID winid,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name) : wxPanel(parent, winid, pos, size, style, name) {
|
||||
|
||||
m_propertyGrid = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE | wxPG_NO_INTERNAL_BORDER);
|
||||
m_propertyGrid = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE);
|
||||
|
||||
bSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user