Skip to content

Commit

Permalink
Hide code labels on options dialog by default
Browse files Browse the repository at this point in the history
Hold down SHIFT to show them while opening the dialog
  • Loading branch information
Blake-Madden committed Sep 14, 2024
1 parent 228a5a6 commit 1e62cc1
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/gui/projectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,23 @@ void NewProjectDialog::OnExcludedFileButtonClick([[maybe_unused]] wxCommandEvent
//-------------------------------------------------------------
void NewProjectDialog::CreateControls()
{
const auto buildCodeLabel = [](const wxString& label, wxWindow* parent)
const auto buildCodeLabel = [](const wxString& label, wxWindow* parent) -> wxWindow*
{
wxStaticText* statLabel = new wxStaticText(parent, wxID_STATIC, L"[" + label + L"]",
wxDefaultPosition, wxDefaultSize);
statLabel->SetFont(statLabel->GetFont().Bold());
statLabel->SetForegroundColour(wxSystemSettings::GetAppearance().IsDark() ?
wxColour{ L"#89CFF0" } :
wxColour{ L"#0095B6" });
return statLabel;
if (wxGetMouseState().ShiftDown())
{
wxStaticText* statLabel = new wxStaticText(parent, wxID_STATIC, L"[" + label + L"]",
wxDefaultPosition, wxDefaultSize);
statLabel->SetFont(statLabel->GetFont().Bold());
statLabel->SetForegroundColour(wxSystemSettings::GetAppearance().IsDark() ?
wxColour{ L"#89CFF0" } :
wxColour{ L"#0095B6" });
return statLabel;
}
else
{
return new wxStaticText(parent, wxID_STATIC, wxString{}, wxDefaultPosition,
wxDefaultSize);
}
};

wxListbook* listBook = new wxListbook(this, wxID_ANY);
Expand Down

0 comments on commit 1e62cc1

Please sign in to comment.