Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ obj
/out
.vs
packages
.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xFF",
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.149",
"alpha" : "1.000",
"blue" : "0.149",
"green" : "0.149"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xD9",
"alpha" : "1.000",
"blue" : "0xD9",
"green" : "0xD9"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x00",
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0x00"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"info" : {
"version" : 1,
"author" : "xcode"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"reference" : "secondaryLabelColor"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"reference" : "labelColor"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xF0",
"alpha" : "1.000",
"blue" : "0xF3",
"green" : "0xF1"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x26",
"alpha" : "1.000",
"blue" : "0x26",
"green" : "0x26"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xF8",
"alpha" : "1.000",
"blue" : "0xF7",
"green" : "0xF8"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x55",
"alpha" : "1.000",
"blue" : "0x55",
"green" : "0x55"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xFF",
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x3D",
"alpha" : "1.000",
"blue" : "0x3D",
"green" : "0x3D"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.000",
"alpha" : "0.100",
"blue" : "0.000",
"green" : "0.000"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"alpha" : "0.000",
"blue" : "1.000",
"green" : "1.000"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.000",
"alpha" : "0.080",
"blue" : "0.000",
"green" : "0.000"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"alpha" : "0.100",
"blue" : "1.000",
"green" : "1.000"
}
}
}
]
}
4 changes: 2 additions & 2 deletions Xamarin.PropertyEditing.Mac.Standalone/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,8 @@
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="qr0-t0-q16">
<font key="font" metaFont="system"/>
<segments>
<segment label="Dark" width="61" selected="YES"/>
<segment label="Light" width="61" tag="1"/>
<segment label="Dark" width="61"/>
<segment label="Light" width="61" selected="YES" tag="1"/>
<segment label="None"/>
</segments>
</segmentedCell>
Expand Down
23 changes: 12 additions & 11 deletions Xamarin.PropertyEditing.Mac.Standalone/ViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,19 @@ async Task SetInitialValuesAsync (MockedSampleControlButton mocked)
// If theme toggled, then notify our manager
partial void OnThemeChanged (NSObject sender)
{
var themeControl = sender as NSSegmentedControl;
switch (themeControl.SelectedSegment) {
case 0:
PropertyEditorPanel.ThemeManager.Theme = Themes.PropertyEditorTheme.Dark;
break;
case 1:
PropertyEditorPanel.ThemeManager.Theme = Themes.PropertyEditorTheme.Light;
break;
case 2:
PropertyEditorPanel.ThemeManager.Theme = Themes.PropertyEditorTheme.None;
break;
var themeControl = (NSSegmentedControl)sender;

NSString appearance = NSAppearance.NameAqua;
if (themeControl.SelectedSegment == 0) {
if (NSProcessInfo.ProcessInfo.OperatingSystemVersion.Minor > 13)
appearance = NSAppearance.NameDarkAqua;
else
appearance = NSAppearance.NameVibrantDark;
}

var realAppearance = NSAppearance.GetAppearance (appearance);
((HostResourceProvider)PropertyPanel.HostResourceProvider).CurrentAppearance = realAppearance;
View.Appearance = realAppearance;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512%402x.png" />
<ImageAsset Include="Assets.xcassets\Contents.json" />
<ImageAsset Include="Assets.xcassets\Checkerboard0.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\Checkerboard1.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\ForegroundColor.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\PadBackgroundColor.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\PopoverContentBackground.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\ValueBlockBackgroundColor.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\DescriptionLabelColor.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\TabBorderColor.colorset\Contents.json" />
<ImageAsset Include="Assets.xcassets\PanelTabBackground.colorset\Contents.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
Expand Down
Loading