mariuz / flamerobin

FlameRobin is a database administration tool for Firebird RDBMS. Our goal is to build a tool that is: lightweight (small footprint, fast execution) cross-platform (Linux, Windows, Mac OS X, FreeBSD) dependent only on other Open Source software
http://flamerobin.org
MIT License
216 stars 67 forks source link

StatementHistoryDialog strange sizing #31

Closed arvanus closed 5 years ago

arvanus commented 5 years ago

I compiled Flamerobin from source code, and at History dialog search left size are using minimal width. I don't work with wxWidget, so I can't find where to change it, but appears do be at StatementHistoryDialog contructor, any idea what to change, so I cant test and send a fix?

Thanks!

Ps: the user can resize the view at runtime Default: image Manual resizing is ok: image

Something here, I think:

    mainSplitter = new wxSplitterWindow( getControlsPanel(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
    leftSplitterPanel = new wxPanel( mainSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
    wxBoxSizer* leftSplitterSizer = new wxBoxSizer( wxVERTICAL );

    leftSplitterPanel->SetSizer( leftSplitterSizer );
    rightSplitterPanel = new wxPanel( mainSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
    wxBoxSizer* rightSplitterSizer = new wxBoxSizer( wxVERTICAL );
    rightSplitterPanel->SetSizer( rightSplitterSizer );

    mainSplitter->SplitVertically( leftSplitterPanel, rightSplitterPanel, 0 );

    listbox_search = new wxListBox(leftSplitterPanel, ID_listbox_search,
        wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_MULTIPLE);
    leftSplitterSizer->Add(listbox_search, 1, wxTOP|wxEXPAND,
        styleguide().getRelatedControlMargin(wxVERTICAL));
    dateTimeTextM = new wxStaticText(leftSplitterPanel, wxID_ANY,
        _("Date and time of selected item"), wxDefaultPosition, wxDefaultSize, 0);
    leftSplitterSizer->Add(dateTimeTextM, 0, wxTOP|wxEXPAND,
        styleguide().getRelatedControlMargin(wxVERTICAL));

    textctrl_statement = new wxStyledTextCtrl(rightSplitterPanel, wxID_ANY,
        wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
    textctrl_statement->SetWrapMode(wxSTC_WRAP_WORD);
    textctrl_statement->SetMarginWidth(1, 0);  // turn off the folding margin
    textctrl_statement->StyleSetForeground(1, *wxWHITE);
    textctrl_statement->StyleSetBackground(1, *wxRED);
    textctrl_statement->SetText(_("Selected SQL statement"));
    rightSplitterSizer->Add(textctrl_statement, 1, wxTOP|wxEXPAND,
        styleguide().getRelatedControlMargin(wxVERTICAL));

    leftSplitterPanel->Layout();
    leftSplitterSizer->Fit( leftSplitterPanel );
    rightSplitterPanel->Layout();
    rightSplitterSizer->Fit( rightSplitterPanel );
    innerSizer->Add( mainSplitter, 1, wxEXPAND, 0 );

    button_copy = new wxButton(getControlsPanel(), ID_button_copy,
        _("C&opy Selection To Editor"), wxDefaultPosition, wxDefaultSize, 0);
    button_cancel = new wxButton(getControlsPanel(), wxID_CANCEL,
        _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0);

    wxSizer* sizerButtons = styleguide().createButtonSizer(
        button_copy, button_cancel);

    // use method in base class to set everything up
    layoutSizers(innerSizer, sizerButtons, true);
arvanus commented 5 years ago

I've found the line 70, and changed: leftSplitterPanel = new wxPanel( mainSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); to: leftSplitterPanel = new wxPanel( mainSplitter, wxID_ANY, wxDefaultPosition, wxSize(100, 1), wxTAB_TRAVERSAL );

image