Add systemPreferences.isInvertedColorScheme API
This commit is contained in:
parent
2efb7a12cb
commit
7b49d94e9f
2 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "atom/common/native_mate_converters/value_converter.h"
|
||||
#include "atom/common/node_includes.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
@ -60,6 +61,8 @@ void SystemPreferences::BuildPrototype(
|
|||
.SetMethod("isSwipeTrackingFromScrollEventsEnabled",
|
||||
&SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled)
|
||||
#endif
|
||||
.SetMethod("isInvertedColorScheme",
|
||||
&color_utils::IsInvertedColorScheme)
|
||||
.SetMethod("isDarkMode", &SystemPreferences::IsDarkMode);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,4 +30,10 @@ describe('systemPreferences module', function () {
|
|||
assert(languages.length > 0)
|
||||
})
|
||||
})
|
||||
|
||||
describe('systemPreferences.isInvertedColorScheme()', function () {
|
||||
it('returns a boolean', function () {
|
||||
assert.equal(typeof systemPreferences.isInvertedColorScheme(), 'boolean')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue