-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1023 from picoe/hotfix/addin-dark-theme
Hotfix/addin dark theme
- Loading branch information
Showing
49 changed files
with
497 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using Eto.Drawing; | ||
namespace Eto.Addin.MonoDevelop | ||
{ | ||
public static class Extensions | ||
{ | ||
public static Color ToEto(this Xwt.Drawing.Color color) | ||
{ | ||
return new Color((float)color.Red, (float)color.Green, (float)color.Blue, (float)color.Alpha); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+717 Bytes
(100%)
src/Addins/Eto.Addin.MonoDevelop/Images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Eto; | ||
using Eto.Addin.MonoDevelop; | ||
using Eto.Designer; | ||
using Eto.Drawing; | ||
using MonoDevelop.Ide.Gui; | ||
|
||
[assembly: ExportHandler(typeof(IPlatformTheme), typeof(PlatformThemeHandler))] | ||
|
||
namespace Eto.Addin.MonoDevelop | ||
{ | ||
public class PlatformThemeHandler : IPlatformTheme | ||
{ | ||
public Color ProjectBackground => Styles.NewProjectDialog.ProjectConfigurationLeftHandBackgroundColor.ToEto(); | ||
|
||
public Color ProjectForeground => Styles.BaseForegroundColor.ToEto(); | ||
|
||
public Color ProjectDialogBackground => ProjectBackground; // not used on mac anyway.. | ||
|
||
public Color ErrorForeground => Styles.ErrorForegroundColor.ToEto(); | ||
|
||
public Color SummaryBackground => Styles.NewProjectDialog.ProjectConfigurationRightHandBackgroundColor.ToEto(); | ||
|
||
public Color SummaryForeground => Styles.NewProjectDialog.ProjectConfigurationPreviewLabelColor.ToEto(); | ||
|
||
public Color DesignerBackground => Styles.BaseBackgroundColor.ToEto(); | ||
|
||
public Color DesignerPanel => Styles.BackgroundColor.ToEto(); | ||
|
||
public IEnumerable<PlatformColor> AllColors => throw new NotImplementedException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using System; | ||
using Eto.Forms; | ||
using Eto.Drawing; | ||
using Eto.Designer; | ||
using System.Linq; | ||
|
||
namespace Eto.Addin.Shared | ||
{ | ||
public partial class ThemedColorsDialog : Dialog | ||
{ | ||
public ThemedColorsDialog() | ||
{ | ||
Title = "All themed colors"; | ||
Resizable = true; | ||
ClientSize = new Size(400, 350); | ||
|
||
var okButton = new Button { Text = "Ok" }; | ||
okButton.Click += (sender, e) => Close(); | ||
|
||
var colorsPanel = new GridView(); | ||
colorsPanel.Columns.Add(new GridColumn | ||
{ | ||
HeaderText = "Name", | ||
DataCell = new TextBoxCell { Binding = Binding.Property((PlatformColor m) => m.Name) } | ||
}); | ||
|
||
colorsPanel.Columns.Add(new GridColumn | ||
{ | ||
HeaderText = "Name", | ||
Width = 40, | ||
AutoSize = false, | ||
DataCell = new CustomCell | ||
{ | ||
CreateCell = e => | ||
{ | ||
var p = new Panel { Size = new Size(20, 20) }; | ||
p.BindDataContext(c => c.BackgroundColor, (PlatformColor m) => m.Color); | ||
return p; | ||
} | ||
} | ||
}); | ||
colorsPanel.DataStore = Global.Theme.AllColors.ToList(); | ||
|
||
Content = new StackLayout | ||
{ | ||
Padding = 10, | ||
Items = | ||
{ | ||
new StackLayoutItem { | ||
Expand = true, | ||
HorizontalAlignment = HorizontalAlignment.Stretch, | ||
Control = new Scrollable { Content = colorsPanel } | ||
}, | ||
|
||
new StackLayoutItem | ||
{ | ||
HorizontalAlignment = HorizontalAlignment.Right, | ||
Control = okButton | ||
} | ||
} | ||
}; | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.