Change ColorEntry base to ExprEntry to support math expressions (fix #3900)

This commit is contained in:
Akylzhan 2023-06-22 05:40:47 +06:00 committed by David Capello
parent da90a57ce0
commit 3e171d0f6a

View File

@ -14,6 +14,7 @@
#include "app/color_utils.h"
#include "app/modules/gfx.h"
#include "app/ui/color_sliders.h"
#include "app/ui/expr_entry.h"
#include "app/ui/skin/skin_slider_property.h"
#include "app/ui/skin/skin_theme.h"
#include "base/scoped_value.h"
@ -128,13 +129,14 @@ namespace {
app::Color m_color;
};
class ColorEntry : public Entry {
class ColorEntry : public ExprEntry {
public:
ColorEntry(Slider* absSlider, Slider* relSlider)
: Entry(4, "0")
: ExprEntry()
, m_absSlider(absSlider)
, m_relSlider(relSlider)
, m_recent_focus(false) {
setText("0");
}
private: