diff --git a/LiteEditor/quickoutlinedlg.cpp b/LiteEditor/quickoutlinedlg.cpp index f36c60a843..d50d9ebbcc 100644 --- a/LiteEditor/quickoutlinedlg.cpp +++ b/LiteEditor/quickoutlinedlg.cpp @@ -33,7 +33,7 @@ #include "windowattrmanager.h" QuickOutlineDlg::QuickOutlineDlg(wxWindow* parent, int id, wxPoint pos, wxSize size, int style) - : wxDialog(parent, id, wxEmptyString, pos, size, wxRESIZE_BORDER) + : wxDialog(parent, id, wxEmptyString, pos, size, wxRESIZE_BORDER | wxCAPTION) { const wxColour& bgColour = DrawingUtils::GetColours().GetBgColour(); SetBackgroundColour(bgColour); @@ -122,14 +122,18 @@ void QuickOutlineDlg::OnKeyDown(wxKeyEvent& e) } } } else { - if(e.GetKeyCode() == WXK_ESCAPE) { DoHide(); } + if(e.GetKeyCode() == WXK_ESCAPE) { + DoHide(); + } } } bool QuickOutlineDlg::ParseActiveBuffer() { IEditor* editor = clGetManager()->GetActiveEditor(); - if(!editor) { return false; } + if(!editor) { + return false; + } wxString filename = editor->GetFileName().GetFullPath(); TagEntryPtrVector_t tags; @@ -139,7 +143,9 @@ bool QuickOutlineDlg::ParseActiveBuffer() TagsManagerST::Get()->GetFileCache()->Update(editor->GetFileName(), tags); } - if(tags.empty()) { return false; } + if(tags.empty()) { + return false; + } m_treeOutline->BuildTree(filename, tags); m_treeOutline->ExpandAll(); wxTreeItemId selectItem = m_treeOutline->GetNextItem(m_treeOutline->GetRootItem()); @@ -152,17 +158,23 @@ void QuickOutlineDlg::DoFindNext() { m_treeOutline->ClearAllHighlights(); wxString find_what = m_searchCtrl->GetValue(); - if(find_what.empty()) { return; } + if(find_what.empty()) { + return; + } wxTreeItemId focusedItem = m_treeOutline->GetFocusedItem(); CHECK_ITEM_RET(focusedItem); wxTreeItemId nextItem = m_treeOutline->GetNextItem(focusedItem); - if(!nextItem.IsOk()) { nextItem = focusedItem; } + if(!nextItem.IsOk()) { + nextItem = focusedItem; + } wxTreeItemId item = m_treeOutline->FindNext(nextItem, find_what, 0, wxTR_SEARCH_DEFAULT); // if we fail to move on, use the current focused item - if(!item.IsOk()) { item = m_treeOutline->FindPrev(focusedItem, find_what, 0, wxTR_SEARCH_DEFAULT); } + if(!item.IsOk()) { + item = m_treeOutline->FindPrev(focusedItem, find_what, 0, wxTR_SEARCH_DEFAULT); + } if(item.IsOk()) { m_treeOutline->SelectItem(item); m_treeOutline->HighlightText(item, true); @@ -174,17 +186,23 @@ void QuickOutlineDlg::DoFindPrev() { m_treeOutline->ClearAllHighlights(); wxString find_what = m_searchCtrl->GetValue(); - if(find_what.empty()) { return; } + if(find_what.empty()) { + return; + } wxTreeItemId focusedItem = m_treeOutline->GetFocusedItem(); CHECK_ITEM_RET(focusedItem); wxTreeItemId prevItem = m_treeOutline->GetPrevItem(focusedItem); - if(!prevItem.IsOk()) { prevItem = focusedItem; } + if(!prevItem.IsOk()) { + prevItem = focusedItem; + } wxTreeItemId item = m_treeOutline->FindPrev(prevItem, find_what, 0, wxTR_SEARCH_DEFAULT); // if we fail to move on, use the current focused item - if(!item.IsOk()) { item = m_treeOutline->FindPrev(focusedItem, find_what, 0, wxTR_SEARCH_DEFAULT); } + if(!item.IsOk()) { + item = m_treeOutline->FindPrev(focusedItem, find_what, 0, wxTR_SEARCH_DEFAULT); + } if(item.IsOk()) { m_treeOutline->SelectItem(item); m_treeOutline->HighlightText(item, true); diff --git a/Plugin/GotoAnythingBaseUI.cpp b/Plugin/GotoAnythingBaseUI.cpp index 11efc0e900..7436d6491e 100644 --- a/Plugin/GotoAnythingBaseUI.cpp +++ b/Plugin/GotoAnythingBaseUI.cpp @@ -46,7 +46,9 @@ GotoAnythingBaseDlg::GotoAnythingBaseDlg(wxWindow* parent, wxWindowID id, const SetName(wxT("GotoAnythingBaseDlg")); SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); - if(GetSizer()) { GetSizer()->Fit(this); } + if(GetSizer()) { + GetSizer()->Fit(this); + } if(GetParent()) { CentreOnParent(wxBOTH); } else { diff --git a/Plugin/GotoAnythingBaseUI.h b/Plugin/GotoAnythingBaseUI.h index 43e931b961..eb3c04d502 100644 --- a/Plugin/GotoAnythingBaseUI.h +++ b/Plugin/GotoAnythingBaseUI.h @@ -53,7 +53,7 @@ class GotoAnythingBaseDlg : public wxDialog clThemedListCtrl* GetDvListCtrl() { return m_dvListCtrl; } GotoAnythingBaseDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Goto Anything"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1, -1), - long style = wxBORDER_NONE); + long style = wxCAPTION | wxRESIZE_BORDER | wxBORDER_NONE); virtual ~GotoAnythingBaseDlg(); }; diff --git a/Plugin/GotoAnythingBaseUI.wxcp b/Plugin/GotoAnythingBaseUI.wxcp index aa42fbcaa6..fb423792c7 100644 --- a/Plugin/GotoAnythingBaseUI.wxcp +++ b/Plugin/GotoAnythingBaseUI.wxcp @@ -19,7 +19,7 @@ "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", - "m_styles": ["wxBORDER_NONE"], + "m_styles": ["wxCAPTION", "wxRESIZE_BORDER", "wxBORDER_NONE"], "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], "m_properties": [{ "type": "string", diff --git a/Plugin/openresourcedialogbase.cpp b/Plugin/openresourcedialogbase.cpp index 2851a95ed4..f6f693bca0 100644 --- a/Plugin/openresourcedialogbase.cpp +++ b/Plugin/openresourcedialogbase.cpp @@ -27,9 +27,9 @@ OpenResourceDialogBase::OpenResourceDialogBase(wxWindow* parent, wxWindowID id, m_textCtrlResourceName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTE_PROCESS_ENTER); - m_textCtrlResourceName->SetToolTip(_( - "Type resource name to open.\nYou may use a space delimited list of words to narrow down the list of " - "choices\ne.g. Typing: 'Open Dialog' will include results that contain both words \"Open\" _and_ \"Dialog\"")); + m_textCtrlResourceName->SetToolTip(_("Type resource name to open.\nYou may use a space delimited list of words to " + "narrow down the list of choices\ne.g. Typing: 'Open Dialog' will include " + "results that contain both words \"Open\" _and_ \"Dialog\"")); m_textCtrlResourceName->SetFocus(); #if wxVERSION_NUMBER >= 3000 m_textCtrlResourceName->SetHint(wxT("")); @@ -86,7 +86,9 @@ OpenResourceDialogBase::OpenResourceDialogBase(wxWindow* parent, wxWindowID id, SetName(wxT("OpenResourceDialogBase")); SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); - if(GetSizer()) { GetSizer()->Fit(this); } + if(GetSizer()) { + GetSizer()->Fit(this); + } if(GetParent()) { CentreOnParent(wxBOTH); } else { diff --git a/Plugin/openresourcedialogbase.h b/Plugin/openresourcedialogbase.h index 4bf618b15d..6600780c2e 100644 --- a/Plugin/openresourcedialogbase.h +++ b/Plugin/openresourcedialogbase.h @@ -66,7 +66,8 @@ class OpenResourceDialogBase : public wxDialog wxCheckBox* GetCheckBoxFiles() { return m_checkBoxFiles; } wxCheckBox* GetCheckBoxShowSymbols() { return m_checkBoxShowSymbols; } OpenResourceDialogBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Open Resource"), - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1, -1), long style = 0); + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1, -1), + long style = wxCAPTION | wxRESIZE_BORDER); virtual ~OpenResourceDialogBase(); }; diff --git a/Plugin/openresourcedialogbase.wxcp b/Plugin/openresourcedialogbase.wxcp index e8b535e301..4c94d7ab81 100644 --- a/Plugin/openresourcedialogbase.wxcp +++ b/Plugin/openresourcedialogbase.wxcp @@ -19,7 +19,7 @@ "border": 0, "gbSpan": ",", "gbPosition": ",", - "m_styles": [], + "m_styles": ["wxCAPTION", "wxRESIZE_BORDER"], "m_sizerFlags": [], "m_properties": [{ "type": "string",