summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/baside2.hxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-10-14 19:13:05 +0900
committerCaolán McNamara <caolanm@redhat.com>2016-10-25 11:27:03 +0000
commit799a3a7915e6285c8072f92c63ba7149223ac443 (patch)
tree19f57f8ef305c973270446bbf08b32e3d6b32eba /basctl/source/basicide/baside2.hxx
parentc5498c310f6765ec9857e34169fd4a8d48953eb7 (diff)
tdf#103209 Apply application color settings to Basic IDE
This makes the text and background colors in the editor window follow the custom colors "Font color" and "Document background" respectively in Options > LibreOffice > Applications Colors. ... for those who think BASIC looks cooler when written in green text on black background. Change-Id: I82647865f7c2915341249c2fd5ebc9bd8d617bd1 Reviewed-on: https://gerrit.libreoffice.org/29815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl/source/basicide/baside2.hxx')
-rw-r--r--basctl/source/basicide/baside2.hxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 9a5156072e1e..6770ffbdf9a2 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -94,8 +94,6 @@ private:
class ProgressInfo;
std::unique_ptr<ProgressInfo> pProgress;
- virtual void DataChanged(DataChangedEvent const & rDCEvt) override;
-
using Window::Notify;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
@@ -156,6 +154,7 @@ public:
bool CanModify() { return ImpCanModify(); }
+ void ChangeFontColor( Color aColor );
void UpdateSyntaxHighlighting ();
bool GetProcedureName(OUString& rLine, OUString& rProcType, OUString& rProcName) const;
@@ -428,6 +427,8 @@ public:
public:
void BasicAddWatch (OUString const&);
void BasicRemoveWatch ();
+ Color GetBackgroundColor () const { return aSyntaxColors.GetBackgroundColor(); }
+ Color GetFontColor () const { return aSyntaxColors.GetFontColor(); }
Color GetSyntaxColor (TokenType eType) const { return aSyntaxColors.GetColor(eType); }
protected:
@@ -443,9 +444,7 @@ private:
VclPtr<WatchWindow> aWatchWindow;
VclPtr<StackWindow> aStackWindow;
ObjectCatalog& rObjectCatalog;
-private:
- virtual void DataChanged (DataChangedEvent const& rDCEvt) override;
-private:
+
// SyntaxColors -- stores Basic syntax highlighting colors
class SyntaxColors : public utl::ConfigurationListener
{
@@ -454,8 +453,9 @@ private:
virtual ~SyntaxColors () override;
public:
void SetActiveEditor (EditorWindow* pEditor_) { pEditor = pEditor_; }
- void SettingsChanged ();
public:
+ Color GetBackgroundColor () const { return m_aBackgroundColor; };
+ Color GetFontColor () const { return m_aFontColor; }
Color GetColor (TokenType eType) const { return aColors[eType]; }
private:
@@ -463,6 +463,8 @@ private:
void NewConfig (bool bFirst);
private:
+ Color m_aBackgroundColor;
+ Color m_aFontColor;
// the color values (the indexes are TokenType, see comphelper/syntaxhighlight.hxx)
o3tl::enumarray<TokenType, Color> aColors;
// the configuration