[DEV] update label widget
This commit is contained in:
parent
1cfa68a23f
commit
bfedb5336e
@ -23,6 +23,10 @@ ewol::widget::Label::Label() :
|
||||
"",
|
||||
"displayed value string",
|
||||
&ewol::widget::Label::onChangePropertyValue),
|
||||
propertyFontSize(this, "font-size",
|
||||
0,
|
||||
"default font size (0=> system default)",
|
||||
&ewol::widget::Label::onChangePropertyFontSize),
|
||||
m_value(U""),
|
||||
m_colorProperty(null),
|
||||
m_colorDefaultFgText(-1),
|
||||
@ -115,6 +119,9 @@ void ewol::widget::Label::onRegenerateDisplay() {
|
||||
|
||||
// clean the element
|
||||
m_text.reset();
|
||||
if (propertyFontSize.get() != 0) {
|
||||
m_text.setFontSize(propertyFontSize.get());
|
||||
}
|
||||
if (m_colorProperty != null) {
|
||||
m_text.setDefaultColorFg(m_colorProperty->get(m_colorDefaultFgText));
|
||||
m_text.setDefaultColorBg(m_colorProperty->get(m_colorDefaultBgText));
|
||||
@ -159,6 +166,10 @@ void ewol::widget::Label::onChangePropertyValue() {
|
||||
requestUpdateSize();
|
||||
}
|
||||
|
||||
void ewol::widget::Label::onChangePropertyFontSize() {
|
||||
onChangePropertyValue();
|
||||
}
|
||||
|
||||
void ewol::widget::Label::onChangePropertyAutoTranslate() {
|
||||
onChangePropertyValue();
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ namespace ewol {
|
||||
public: // properties
|
||||
eproperty::Value<bool> propertyAutoTranslate; //!< if at true the data is translate automaticaly translate.
|
||||
eproperty::Value<etk::String> propertyValue; //!< decorated text to display.
|
||||
eproperty::Value<int32_t> propertyFontSize; //!< default size of the font.
|
||||
private:
|
||||
ewol::compositing::Text m_text; //!< Compositing text element.
|
||||
etk::UString m_value;
|
||||
@ -56,6 +57,7 @@ namespace ewol {
|
||||
protected:
|
||||
virtual void onChangePropertyValue();
|
||||
virtual void onChangePropertyAutoTranslate();
|
||||
virtual void onChangePropertyFontSize();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user