diff --git a/pgadmin/ctl/ctlSQLBox.cpp b/pgadmin/ctl/ctlSQLBox.cpp
index e5ac646..bde0363 100644
--- a/pgadmin/ctl/ctlSQLBox.cpp
+++ b/pgadmin/ctl/ctlSQLBox.cpp
@@ -110,6 +110,8 @@ void ctlSQLBox::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
StyleSetFont(i, fntSQLBox);
}
+ // Margin style
+ StyleSetBackground(wxSTC_STYLE_LINENUMBER, settings->GetSQLMarginBackgroundColour());
// Brace maching styles
StyleSetBackground(34, wxColour(0x99, 0xF9, 0xFF));
StyleSetBackground(35, wxColour(0xFF, 0xCF, 0x27));
diff --git a/pgadmin/frm/frmOptions.cpp b/pgadmin/frm/frmOptions.cpp
index c9f23ee..5b7dc78 100644
--- a/pgadmin/frm/frmOptions.cpp
+++ b/pgadmin/frm/frmOptions.cpp
@@ -82,6 +82,7 @@
#define pickerSQLForegroundColour CTRL_COLOURPICKER("pickerSQLForegroundColour")
#define stSQLCustomBackgroundColour CTRL_STATIC("stSQLCustomBackgroundColour")
#define stSQLCustomForegroundColour CTRL_STATIC("stSQLCustomForegroundColour")
+#define pickerSQLMarginBackgroundColour CTRL_COLOURPICKER("pickerSQLMarginBackgroundColour")
BEGIN_EVENT_TABLE(frmOptions, pgDialog)
EVT_MENU(MNU_HELP, frmOptions::OnHelp)
@@ -412,6 +413,8 @@ void frmOptions::UpdateColourControls()
pickerSQLForegroundColour->SetColour(settings->GetSQLBoxColourForeground());
stSQLCustomForegroundColour->Enable(true);
}
+
+ pickerSQLMarginBackgroundColour->SetColour(settings->GetSQLMarginBackgroundColour());
}
void frmOptions::OnChangeSQLUseCustomColour(wxCommandEvent &ev)
@@ -660,8 +663,8 @@ void frmOptions::OnOK(wxCommandEvent &ev)
settings->SetFavouritesFile(txtFavouritesFile->GetValue());
settings->SetMacrosFile(txtMacrosFile->GetValue());
settings->SetHistoryFile(txtHistoryFile->GetValue());
- // Change SQL Syntax colours
+ // Change SQL Syntax colours
if (settings->GetSQLBoxUseSystemBackground() != chkSQLUseSystemBackgroundColour->GetValue())
{
changed = true;
@@ -692,6 +695,12 @@ void frmOptions::OnOK(wxCommandEvent &ev)
settings->SetSQLBoxColourForeground(sColour);
}
+ colour = pickerSQLMarginBackgroundColour->GetColour();
+ sColour = colour.GetAsString(wxC2S_HTML_SYNTAX);
+ if (sColour != settings->GetSQLMarginBackgroundColour())
+ changed = true;
+ settings->SetSQLMarginBackgroundColour(sColour);
+
for (int i = 0; i <= 11; ++i)
{
wxString pickerId = wxString::Format(wxT("pickerSQLColour%i"), i);
diff --git a/pgadmin/include/utils/sysSettings.h b/pgadmin/include/utils/sysSettings.h
index 0a68371..4616d42 100644
--- a/pgadmin/include/utils/sysSettings.h
+++ b/pgadmin/include/utils/sysSettings.h
@@ -155,6 +155,9 @@ public:
wxString GetSQLBoxColour(int index) const { wxString s; Read(wxString::Format(wxT("ctlSQLBox/Colour%i"), index), &s, getDefaultElementColor(index)); return s; }
void SetSQLBoxColour(int index, const wxString &newval) { Write(wxString::Format(wxT("ctlSQLBox/Colour%i"), index), newval); }
+ wxString GetSQLMarginBackgroundColour() const { wxString s; Read(wxT("ctlSQLBox/MarginBackgroundColour"), &s, wxT("#dddddd")); return s; }
+ void SetSQLMarginBackgroundColour(const wxString &newval) { Write(wxT("ctlSQLBox/MarginBackgroundColour"), newval); }
+
// Misc options
long GetAutoRowCountThreshold() const { long l; Read(wxT("AutoRowCount"), &l, 2000L); return l; }
void SetAutoRowCountThreshold(const long newval) { Write(wxT("AutoRowCount"), newval); }
diff --git a/pgadmin/ui/frmOptions.xrc b/pgadmin/ui/frmOptions.xrc
index 162423e..917315c 100644
--- a/pgadmin/ui/frmOptions.xrc
+++ b/pgadmin/ui/frmOptions.xrc
@@ -493,84 +493,93 @@
25,12d
+
+
+