Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVsevolod Kukol <sevo@xamarin.com>2015-11-09 10:57:42 +0300
committerVsevolod Kukol <sevoku@xamarin.com>2015-11-29 18:44:15 +0300
commitdb0f6253dc01c1f99b3f4cf729b93d011124dbd3 (patch)
treed862828e9d60ed8ddc8197b055e24558c99cfb48 /main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs
parent5c06d180b58226bb014506c469d41ef53e978ab2 (diff)
[Gettext] Add dark skin support
Diffstat (limited to 'main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs')
-rw-r--r--main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs43
1 files changed, 25 insertions, 18 deletions
diff --git a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs
index c0d6386e40..0d6a78a702 100644
--- a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs
+++ b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/POEditorWidget.cs
@@ -250,6 +250,15 @@ namespace MonoDevelop.Gettext
this.texteditorPlural.Options = DefaultSourceEditorOptions.PlainEditor;
this.texteditorOriginal.IsReadOnly = true;
this.texteditorPlural.IsReadOnly = true;
+ toolbarPages.ModifyBg (StateType.Normal, Styles.POEditor.TabBarBackgroundColor);
+
+ MonoDevelop.Ide.Gui.Styles.Changed += HandleStylesChanged;
+ }
+
+ void HandleStylesChanged (object sender, EventArgs e)
+ {
+ UpdateFromCatalog ();
+ toolbarPages.ModifyBg (StateType.Normal, Styles.POEditor.TabBarBackgroundColor);
}
void HandleCellRendFuzzyToggled (object sender, ToggledArgs args)
@@ -316,25 +325,25 @@ namespace MonoDevelop.Gettext
searchIn = PropertyService.Get ("GettetAddin.Search.SearchIn", SearchIn.Both);
}
- static bool IsCaseSensitive {
- get {
- return isCaseSensitive;
+ static bool IsCaseSensitive {
+ get {
+ return isCaseSensitive;
}
set {
PropertyService.Set ("GettetAddin.Search.IsCaseSensitive", value);
isCaseSensitive = value;
- }
+ }
}
- static bool IsWholeWordOnly {
- get {
- return isWholeWordOnly;
- }
+ static bool IsWholeWordOnly {
+ get {
+ return isWholeWordOnly;
+ }
set {
PropertyService.Set ("GettetAddin.Search.IsWholeWordOnly", value);
isWholeWordOnly = value;
- }
- }
+ }
+ }
static bool RegexSearch {
get {
@@ -691,22 +700,17 @@ namespace MonoDevelop.Gettext
static string iconValid = "md-done";//"md-translation-valid";
static string iconMissing = "md-warning";//"md-translation-missing";
-// static Color translated = new Color (255, 255, 255);
- static Color untranslated = new Color (234, 232, 227);
- static Color fuzzy = new Color (237, 226, 187);
- static Color missing = new Color (237, 167, 167);
-
Color GetRowColorForEntry (CatalogEntry entry)
{
if (entry.References.Length == 0)
- return missing;
- return entry.IsFuzzy ? fuzzy : entry.IsTranslated ? Style.Base (StateType.Normal) : untranslated;
+ return Styles.POEditor.EntryMissingBackgroundColor;
+ return entry.IsFuzzy ? Styles.POEditor.EntryFuzzyBackgroundColor : entry.IsTranslated ? Style.Base (StateType.Normal) : Styles.POEditor.EntryUntranslatedBackgroundColor;
}
Color GetForeColorForEntry (CatalogEntry entry)
{
if (entry.References.Length == 0)
- return missing;
+ return Styles.POEditor.EntryMissingBackgroundColor;
return entry.IsFuzzy ? Style.Black : entry.IsTranslated ? Style.Text (StateType.Normal) : Style.Black;
}
@@ -810,10 +814,12 @@ namespace MonoDevelop.Gettext
} catch (Exception e) {
IdeApp.Workbench.StatusBar.ShowError (e.Message);
this.searchEntryFilter.Entry.ModifyBase (StateType.Normal, errorColor);
+ this.searchEntryFilter.QueueDraw ();
return;
}
}
this.searchEntryFilter.Entry.ModifyBase (StateType.Normal, Style.Base (StateType.Normal));
+ this.searchEntryFilter.QueueDraw ();
int found = 0;
ListStore newStore = new ListStore (typeof(CatalogEntry));
@@ -942,6 +948,7 @@ namespace MonoDevelop.Gettext
protected override void OnDestroyed ()
{
+ MonoDevelop.Ide.Gui.Styles.Changed -= HandleStylesChanged;
StopTaskWorkerThread ();
if (store != null) {