Add support to set color transparency from Lua
This commit is contained in:
committed by
Robin Gareus
parent
d09a972b73
commit
7fa17f50da
@@ -1113,9 +1113,10 @@ LuaInstance::register_classes (lua_State* L, bool sandbox)
|
||||
|
||||
.addCFunction ("actionlist", &lua_actionlist)
|
||||
|
||||
|
||||
.beginClass <UIConfiguration> ("UIConfiguration")
|
||||
.addFunction ("set_modifier", (void (UIConfiguration::*)(std::string const&, std::string const&))&UIConfiguration::set_modifier)
|
||||
#undef UI_CONFIG_VARIABLE
|
||||
|
||||
#define UI_CONFIG_VARIABLE(Type,var,name,value) \
|
||||
.addFunction ("get_" # var, &UIConfiguration::get_##var) \
|
||||
.addFunction ("set_" # var, &UIConfiguration::set_##var) \
|
||||
|
||||
@@ -824,6 +824,13 @@ UIConfiguration::set_modifier (string const & name, SVAModifier svam)
|
||||
ColorsChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
UIConfiguration::set_modifier (string const & name, string const & mod_str)
|
||||
{
|
||||
SVAModifier svam (mod_str);
|
||||
set_modifier (name, svam);
|
||||
}
|
||||
|
||||
void
|
||||
UIConfiguration::load_rc_file (bool themechange, bool allow_own)
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void set_alias (std::string const& name, std::string const& alias);
|
||||
void set_color (const std::string& name, Gtkmm2ext::Color);
|
||||
void set_modifier (std::string const&, Gtkmm2ext::SVAModifier svam);
|
||||
void set_modifier (std::string const& name, std::string const& mod_str);
|
||||
|
||||
Gtkmm2ext::Color quantized (Gtkmm2ext::Color) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user