Diff of /src/hugin1/hugin/PreviewFrame.cpp [8d6de6] .. [dd7a6b]  Maximize  Restore

  Switch to unified view

a/src/hugin1/hugin/PreviewFrame.cpp b/src/hugin1/hugin/PreviewFrame.cpp
...
...
142
    m_ButtonPanel->SetScrollRate(10, 0);
142
    m_ButtonPanel->SetScrollRate(10, 0);
143
    m_ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
143
    m_ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
144
    m_ButtonPanel->SetAutoLayout(true);
144
    m_ButtonPanel->SetAutoLayout(true);
145
    m_ButtonPanel->SetSizer(m_ButtonSizer);
145
    m_ButtonPanel->SetSizer(m_ButtonSizer);
146
                        
146
                        
147
    m_ToggleButtonSizer->Add(m_ButtonPanel, 1, wxEXPAND | wxADJUST_MINSIZE, 0);
147
    m_ToggleButtonSizer->Add(m_ButtonPanel, 1, wxEXPAND, 0);
148
148
149
    m_topsizer->Add(m_ToggleButtonSizer, 0, wxEXPAND | wxADJUST_MINSIZE | wxALL, 5);
149
    m_topsizer->Add(m_ToggleButtonSizer, 0, wxEXPAND | wxALL, 5);
150
150
151
    wxFlexGridSizer * flexSizer = new wxFlexGridSizer(2,0,5,5);
151
    wxFlexGridSizer * flexSizer = new wxFlexGridSizer(2,0,5,5);
152
    flexSizer->AddGrowableCol(0);
152
    flexSizer->AddGrowableCol(0);
153
    flexSizer->AddGrowableRow(0);
153
    flexSizer->AddGrowableRow(0);
154
154
...
...
170
                                wxSL_VERTICAL | wxSL_AUTOTICKS,
170
                                wxSL_VERTICAL | wxSL_AUTOTICKS,
171
                                wxDefaultValidator,
171
                                wxDefaultValidator,
172
                                _("VFOV"));
172
                                _("VFOV"));
173
    m_VFOVSlider->SetLineSize(2);
173
    m_VFOVSlider->SetLineSize(2);
174
    m_VFOVSlider->SetPageSize(10);
174
    m_VFOVSlider->SetPageSize(10);
175
#if wxCHECK_VERSION(3,0,1)
176
    m_VFOVSlider->SetTickFreq(5);
177
#else
175
    m_VFOVSlider->SetTickFreq(5,0);
178
    m_VFOVSlider->SetTickFreq(5,0);
179
#endif
176
    m_VFOVSlider->SetToolTip(_("drag to change the vertical field of view"));
180
    m_VFOVSlider->SetToolTip(_("drag to change the vertical field of view"));
177
181
178
    flexSizer->Add(m_VFOVSlider, 0, wxEXPAND);
182
    flexSizer->Add(m_VFOVSlider, 0, wxEXPAND);
179
183
180
    m_HFOVSlider = new wxSlider(this, -1, 1,
184
    m_HFOVSlider = new wxSlider(this, -1, 1,
...
...
183
                                wxSL_HORIZONTAL | wxSL_AUTOTICKS,
187
                                wxSL_HORIZONTAL | wxSL_AUTOTICKS,
184
                                wxDefaultValidator,
188
                                wxDefaultValidator,
185
                                _("HFOV"));
189
                                _("HFOV"));
186
    m_HFOVSlider->SetPageSize(10);
190
    m_HFOVSlider->SetPageSize(10);
187
    m_HFOVSlider->SetLineSize(2);
191
    m_HFOVSlider->SetLineSize(2);
192
#if wxCHECK_VERSION(3,0,1)
193
    m_HFOVSlider->SetTickFreq(5);
194
#else
188
    m_HFOVSlider->SetTickFreq(5,0);
195
    m_HFOVSlider->SetTickFreq(5,0);
196
#endif
189
197
190
    m_HFOVSlider->SetToolTip(_("drag to change the horizontal field of view"));
198
    m_HFOVSlider->SetToolTip(_("drag to change the horizontal field of view"));
191
199
192
    flexSizer->Add(m_HFOVSlider, 0, wxEXPAND);
200
    flexSizer->Add(m_HFOVSlider, 0, wxEXPAND);
193
201
...
...
568
                // breaks on wxWin 2.5
576
                // breaks on wxWin 2.5
569
                but->SetSize(20, sz.GetHeight());
577
                but->SetSize(20, sz.GetHeight());
570
                but->SetValue(true);
578
                but->SetValue(true);
571
                m_ButtonSizer->Add(but,
579
                m_ButtonSizer->Add(but,
572
                                   0,
580
                                   0,
573
                                   wxLEFT | wxTOP | wxADJUST_MINSIZE,
581
                                   wxLEFT | wxTOP,
574
                                   5);
582
                                   5);
575
                m_ToggleButtons.push_back(but);
583
                m_ToggleButtons.push_back(but);
576
                dirty = true;
584
                dirty = true;
577
            }
585
            }
578
        }
586
        }
...
...
585
        wxFileName tFilename(wxString (pano.getImage(i).getFilename().c_str(), HUGIN_CONV_FILENAME));
593
        wxFileName tFilename(wxString (pano.getImage(i).getFilename().c_str(), HUGIN_CONV_FILENAME));
586
        m_ToggleButtons[i]->SetToolTip(tFilename.GetFullName());
594
        m_ToggleButtons[i]->SetToolTip(tFilename.GetFullName());
587
    }
595
    }
588
596
589
    if (dirty) {
597
    if (dirty) {
598
#if wxCHECK_VERSION(3,0,0)
599
        m_ButtonSizer->FitInside(m_ButtonPanel);
600
#else
590
        m_ButtonSizer->SetVirtualSizeHints(m_ButtonPanel);
601
        m_ButtonSizer->SetVirtualSizeHints(m_ButtonPanel);
602
#endif
591
        // Layout();
603
        // Layout();
592
        DEBUG_INFO("New m_ButtonPanel width: " << (m_ButtonPanel->GetSize()).GetWidth());
604
        DEBUG_INFO("New m_ButtonPanel width: " << (m_ButtonPanel->GetSize()).GetWidth());
593
        DEBUG_INFO("New m_ButtonPanel Height: " << (m_ButtonPanel->GetSize()).GetHeight());
605
        DEBUG_INFO("New m_ButtonPanel Height: " << (m_ButtonPanel->GetSize()).GetHeight());
594
    }
606
    }
595
    updatePano();
607
    updatePano();